tyro / rabbit-amazon-bridge

A service that routes JSON messages back and forth between AWS and rabbitmq
Apache License 2.0
18 stars 6 forks source link

Extracting a default.incoming.message.id.key #32

Closed maccac closed 5 years ago

maccac commented 5 years ago

This allows the setting uniqueReference to be overridden, or turned off.

I think having a global default should be good enough at this stage. If we want to have different values per queue we can look at adding to the bridge configuration or adding a new type of transformation.

This should resolve #12

rajeshgpai commented 5 years ago

@maccac Could this be done instead using jolt, where we define a tranformation where aws message id is converted into a specific key?

maccac commented 5 years ago

Good question. Maybe not directly with jolt as the message Id isn't part of the 'body' of the message at this point in the code. I could be wrong, but I think we would either need a non-jolt type of transformation to do that, or to do something similar to this and create a message with more fields that we could then pass it to jolt to do extra transformations.

Options:

Do you have any thoughts?

maccac commented 5 years ago

Had a chat with @rajeshgpai about this offline. We decided that we should default this setting to null. Others can provide pull requests to do transformations, or push this information into the rabbit header instead of the message body if they find it useful.