Вопрос

I need to send(synchronise) data between few(3 and more) apps. And Message Broker must solve few problems:

  1. Broadcast one message to unknown amount of receivers.
  2. Control of success red. Application can success/read a message only once or only after some time out which assigned to this app(connection). Or somehow solve it on client side without high load on server/MB
  3. Deletion of message after all receivers success read a message. It can be solved on client side on central app but native possibility will be useful.

Only one application must know how much app exist in the whole system or it can be moved to Message Broker responsibility.

I already tried: Amazone SQS - it is pure Queue and don't have any high level instruments. RabbitMQ - no possibility to read a message without deleting of it. (May be exist other way)

Это было полезно?

Решение

RabbitMQ fits perfect.

  1. Message posts to topic and this message duplicates to all connected/binded queues. Queue must be created and connected/binded first
  2. Each application works with own copy of message
  3. Message can be read without deletion and only after success process can be deleted. Queue must be created without AMQP_AUTOACK parameter and directive amqp.auto_ack must be 0 in php.ini
Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top