You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Would be a nice addition to support headers, similar to what ActiveMQ have.
Headers are a KV store with two main features:
Header "duplicate_detection" (the name of the header is _AMQ_DUPL_ID in ActiveMQ): if producer try to add two messages in same queue with same value for this header, the message is silent discarded (because it's already in the queue, there is no need to add it again) - I believe this can be easly implemented using unique constraints over json attribute, and insert ... on conflict do nothing.
Custom headers: for example, if a microservice has to discard a message for any reason, it can enrich the message with a explanatory header and send it to archives, making easier for developers to analyze why and when certain messages are being discarded. The advantage on using headers in this case is that is possible to enrich the message in the queue without changing anything in the original body.
I like this a lot, 1) and 2) would be very useful in many cases. I'll need to read up on the headers used in ActiveMQ more.
Adding a column headers jsonb seems reasonable. Do you have any thoughts on how what the API (.send() and .read()) would look like? Ideally usage of unique headers would be optional.
Great idea @ecerichter, thanks for bringing this up!
Would be a nice addition to support headers, similar to what ActiveMQ have.
Headers are a KV store with two main features:
One proposal would be to have one column to store headers in jsonb - and use the "unique index" on json attribute in case of duplicate detection.
Thanks in advance for considering this nice to have :-)
The text was updated successfully, but these errors were encountered: