-
Notifications
You must be signed in to change notification settings - Fork 88
Description
Describe the feature request
SpringWolf-UI allows to send messages via the frontend.
Technically, the SpringwolfAmqpProducer
sends the User's message via a RabbitTemplate
. If there are mutliple RabbitTemplates
beans, the logic takes the first one (without order criteria/guarantee).
I would like to have more control/customization possibilities of the RabbitTemplate
resolve mechanism, e.g. taking the exchange-name and/or routing-key into account.
Motivation
My app uses multiple RabbitTemplates; one for each scenario/business uses case. The routing-key is pre-configured in the corresponding RabbitTemplate
so that the business code has no awareness of routing key specific things. When sending payloads via SpringWolf-UI I would like to publish the message via the corresponding RabbitTemplate and not any one.
Technical details
Some kind of strategy
or resolver
mechanism should suffice. The default implementation copies the current logic (taking 1st RabbitTemplate)
Describe alternatives you've considered
Currently, I have to overwrite/re-implement the whole SpringwolfAmqpProducer#send(String channelName, Object payload)
method :-(