Common Queue Interface
The common abstractions are defined in the core module. To use it, add the following to your build.
libraryDependencies += "com.commercetools" %% "fs2-queues-core" % "0.5.0"
The library provides both low and high level APIs, making it possible to have fine grained control over queue pulling, or just focusing on processing, delegating message management to the library.
The design of the API is the result of the common usage patterns and how the various client SDKs are designed. There are several views possible on a queue:
- as a
QueuePublisher
when you only need to publish messages to an existing queue.
- as a
QueueSubscriber
when you only need to subscribe to an existing queue.
- as a
QueueStatistics
when you only need to gather queue statistics from an existing queue.
- as a
QueueSubscriber
when you only need to subscribe to an existing queue.
- as a
QueueAdministration
when you need to manage queues (creation, deletion, ...).
The entry point is the QueueClient
factory for each underlying queue system.
For each supported queue provider, you can get an instance of the QueueClient
, please refer to the Providers section to see how.