Skip to content

Replace static resolving of RabbitTemplate by dynamic resolving in SpringwolfAmqpProducer #1426

@rfelgent

Description

@rfelgent

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 :-(

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions