Announcement Announcement Module
Collapse
No announcement yet.
OutputChannel for mail:outbound-adapter Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • OutputChannel for mail:outbound-adapter

    I know outbound-channel-adapters are fire and forget...I have scenario after email has been sent out need to update the status

    is there any way to have an output-channel once mail:outbound-channel-adapter fired.

    here is my config

    <int-mail:outbound-channel-adapter channel="emailChannel" mail-sender="mailSender" />
    <bean id="mailSender" class="org.springframework.mail.javamail.JavaMailS enderImpl">
    <property name="session" ref="mailSession" />
    </bean>


    Thanks
    Mahender

  • #2
    Please use [ code ] ... [ /code ] tags (no spaces inside brackets) around the snippet when posting code or configuration.

    Make 'emailChannel' a publish-subscribe channel and subscribe another endpoint (e.g. <service-activator/>) to it.

    The subscribers will be invoked in the order they appear in the configuration file, but I prefer to always add an 'order' attribute to make it clear (e.g. ob adapter order="1", service-activator order="2" will ensure the adapter is always called before the sa, regardless of where their configuration resides).

    If the mail send fails, the second endpoint won't be invoked and the exception will be thrown back to the caller, or sent to the errorChannel if so configured.

    Comment


    • #3
      Thanks for explanation.
      This helped me a lot, it fits for my requirement.

      -Mahender

      Comment

      Working...
      X