Skip to content

Refactor MessageChannelTemplate and gateway classes [INT-1129] #5137

Closed

Description

@spring-operator

Mark Fisher opened INT-1129 and commented

We might want to simplify the AbstractMessagingGateway to rely more upon the MessageChannelTemplate (and we might want to rename it to "MessagingGatewaySupport"?).

To be consistent with other template (e.g. JMS), it would actually make sense to have the methods that accept Objects within the template (rather than requiring Messages), i.e. we could have the equivalent of "sendAndConvert" but delegating to MessageMapper implementations (inbound for send, outbound for receive) instead.


Sub-tasks:

Issue Links:

Activity

  1. spring-operator commented on Jul 25, 2010

    @spring-operator
    ContributorAuthor

    Mark Fisher commented

    We should rename the template (big change, but this is 2.0 and therefore a good chance to get it right) to "MessagingTemplate". We should also create a "MessagingOperations" interface. The convertAndSend/receiveAndConvert methods should all be moved to the template. All of this will make it much more consistent with other Spring templates (such as JmsTemplate and AmqpTemplate).

  2. spring-operator commented on Jul 27, 2010

    @spring-operator
    ContributorAuthor

    Mark Fisher commented

    Also (another big change), for the sake of consistency (see JMS Template) we should probably use: send(channel, message) as opposed to send(message, channel).

  3. spring-operator commented on Jul 28, 2010

    @spring-operator
    ContributorAuthor

    Mark Fisher commented

    A major part of this has now been done (for M6), but there are a few things remaining:

    1. define a MessageOperations interface (in 'core') with all the send/receive methods of MessagingTemplate
    2. add ChannelResolver-awareness to MessagingTemplate and then add convertAndSend/receiveAndConvert methods
    3. Refactor "gateway" classes to use MessagingTemplate directly as necessary (potentially removing the AbstractMessagingGateway/SimpleMessagingGateway and instead providing just convenient template access in MessagingGatewaySupport)

    I will create sub-tasks for those.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions