0.6.0 • Published 1 year ago

@moirae/rabbitmq v0.6.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

@moirae/rabbitmq

A Moirae publisher leveraging RabbitMQ as a transport layer providing:

  • RabbitMQConnection: a connection instance for RabbitMQ. Can be resused (e.g. PubSub)
  • RabbitMQPublisher: Override the default PUBLISHER token
  • RabbitPubSubEngine: Override the default EVENT_PUBSUB_ENGINE token

Lifecycle

onModuleInit

  • Initialize connection to RabbitMQ

onApplicationBootstrap

  • Initialize RabbitMQPublisher
  • Initialize RabbitPubSubEngine

beforeApplicationShutdown

  • Tear down RabbitMQPublisher
  • Tear down RabbitPubSubEngine

onApplicationShutdown

  • Tear down connection to RabbitMQ

External Systems

In cases where events should be published externally to the application (in the case of analytics for instance), there are two ways to subscribe to the event stream.

Pre-processing

To subscribe pre-processing, meaning before the core application has processed but after storing the event, first create a queue for the service and bind the queue to the event store exchange.

Related: Fanout Exchange

Post-processing

To subscribe post-processing within the core application, simply create a queue and bind it to the pubsub exchange.

0.6.0

1 year ago

0.5.3

2 years ago

0.4.1

2 years ago

0.4.2

2 years ago

0.3.1

2 years ago

0.3.0

2 years ago

0.2.2

2 years ago

0.2.0

2 years ago

0.1.1

2 years ago