Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
@rewaa/event-broker
Advanced tools
A broker for all the events that Rewaa will ever produce or consume
A broker for all the events that Rewaa will ever produce or consume.
This package is intended to abstract out the functionality of an event broker keeping the underlying client hidden.
Currently the underlying client is SQS. Under the hood, this broker maps events to queues on SQS. Multiple events may belong to a single queue. A queue can only be consumed by one type of consumer. This means that currently Fan-out is not supported. To send the same type of events, multiple queues would be required.
const eventTopics: IEventTopicMap = {
["SEND_NOTIFICATION"]: {
name: "NOTIFICATION",
isConsuming: true,
isFifo: false,
},
["SEND_NOTIFICATION_FIFO"]: {
name: "NOTIFICATION_FIFO",
isConsuming: true, //will consume this topic
isFifo: true,
visibilityTimeout: 10
}
}
const emitterOptions: = {
emitterType: EmitterType.SQS,
environment: `local`,
eventTopicMap: eventTopics,
localEmitter: new EventEmitter(),
useExternalBroker: true,
isConsumer: true, //If consuming events
deadLetterQueueEnabled: true
};
const emitter = new Emitter(emitterOptions);
emitter.on<{payload: ISendNotificationPayload}>("SEND_NOTIFICATION", async (...data) => {
//Process event
});
await emitter.initialize(emitterOptions);
If you are consuming the topics/queues yourself, but want event-broker to handle the routing logic, you can use the processMessage function like so:
await emitter.processMessage<EmitterType.SQS>(message, topicUrl);
FAQs
A broker for all the events that Rewaa will ever produce or consume
The npm package @rewaa/event-broker receives a total of 21,414 weekly downloads. As such, @rewaa/event-broker popularity was classified as popular.
We found that @rewaa/event-broker demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.