zendesk / maxwell

Maxwell's daemon, a mysql-to-json kafka producer
https://maxwells-daemon.io/
Other
3.99k stars 1k forks source link

RabbitmqProducer allow arguments for exchange given #828

Open seanlook opened 6 years ago

seanlook commented 6 years ago

Rabbitmq producer does not receive exchange arguments, but always null: https://github.com/zendesk/maxwell/blob/4acddf4dfaca093dc60ce621331092b8d345c824/src/main/java/com/zendesk/maxwell/producer/RabbitmqProducer.java#L33

Recently I run into this situation: I need to consume the json data result concurrently. So I group my tables into a predefined array. The rest of my tables shall be consumed in one queue. Alternative exchange allow me to archive this, but exchange must be defined with arguments alternative-exchange: 'xxxx', well this's not supported in maxwell.

Of cause I use rabbitmq policy for now, this can be solved for me.

Just add a new parameter rabbitmq_exchange_arguments to config.properties will be very convinient for users. Please refer: https://www.rabbitmq.com/ae.html

osheroff commented 6 years ago

@tPl0ch @Hiteshm01 any thoughts?

tPl0ch commented 6 years ago

@osheroff Seems reasonable to me.

@seanlook If you provided a patch for this, it will be much appreciated :smiley_cat: