-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use postgres listen/notify for publish and subscribe. #4004
Comments
Right, the
On the other hand, if you have several instances of your application, all those I'm not sure what drove me to stick with the Regarding, channel adapters. I am probably OK with an inbound channel adapter (a WDYT? |
Having multiple instances of the same application and having all of them process the message (therefore a broadcast), is what I had in mind. As you noted, all instances will get the notification via the
What about not to persist the message at all and passing it in the notify? This means all currently listening instances will receive the message, if there is no listener the message is lost. This avoids any housekeeping for the persisted messages.
My prototype is a In overall it would be very similar to camel-pgevent |
Yeah... My bad, sorry. |
as long as we can serialise it into a string (max 8k by default) we can send everything, right?
Why do you think that?
So are you proposing an additional store implementation for supporting broadcasted data? Or providing a |
I find this as an abuse of relation database: it is really better to use tools which were designed for messaging: Apache Kafka, RabbitMQ, Pub/Sub, Event Hubs etc. Hazelcast or ZeroMQ in the end. Why would one try to serialize message to a No, I don't purpose any additional message store impls: I don't think it is going to be easy to come with a persistent topic solution based on DB. Since a I'm OK with a You probably can implement a simple POJO to call |
Is this code available to look at somewhere? I'm looking to use postgresql as a simple pub/sub server with minimal payloads and no delivery guarantees needed. |
Since #3884 we can use postgres' listen/notify in conjunction with the
JdbcMessageStore
.The current implementation is only for queues - but the listen/notify could be also used for publish/subscribe to broadcast messages to all listeners.
p.s.
I've got a working prototype for this adding an inbound- and outbound adapter.
The text was updated successfully, but these errors were encountered: