Announcement Announcement Module
No announcement yet.
Still really struggling with @Publisher Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Still really struggling with @Publisher

    I still can not understand how to get a publisher to publish to an integration channel. I have included the project here. I have been stuck at this point for a couple of days now. I know that message is coming over Spring AMQP but it never fires into the file:outbound-channel-adapter. I think it is because I have two containers and I don't know enough about Spring to merge the containers.

    This is the final step in a proof of concept which looks like at the moment will conclude not to use spring partly due to not getting this example working.

    Any help will be appreciated.

  • #2
    I'll look at the project when I have a moment, but we're really busy right now getting 2.0 Final out the door.

    It does sound like you might be a bit confused though. @Publisher is used for AOP-driven messaging and should not have much to do with an AMQP inbound adapter.


    • #3
      Any chance you can just attach the zip file directly here?


      • #4
        Here it is attached as requested


        • #5
          Quick observations

          1. Your receive.xml defines file-outbound-channel-adapter instead of inbound-channel-adapter and your send is the opposite.
          The bottom line is that inbound-chanel-adapters are used to bridge the path FROM the external system to Spring Integration while outbound-channel-adapter bridge Spring Integration TO the External system

          2. unless you are instantiating two of your configuration as a single application context (which you are not) it will not work without some type of remoting since you are starting two JVMs.

          As far as @Publisher i don't even think you need it.

          Let's try it differently, try to describe your use case and we'll go from there.


          • #6
            @Mark OK I appreciate that you are hard against it.

            @Oleg in my sample the Inbound and Outbound Channel adapters are just used to get and save files. Which is why they may appear at a glance counter-intuitive. But the Publisher component has an file:inbound-adapter which it uses to get files it then uses a service activator to adapt the SI message into an AMQP message and send it.

            The Subscribe end uses Spring AMQP to register a handler that publishes the unwrapped message back to the SI side. I have re-factored it to get it to work now and it does finally work. Attached below. I cant do it properly because I cant wield the IOC and AOP framework due to lack of experience.

            I did have a look at the proper way of doing it with channel adapters like in the Spring - Amqp - Integration in sand box. But I could not compile the sandbox project, because a) there is no POM b) the xsds referenced in the config files were not available.

            Thanks good luck with the 2.0 release. I'll be interested when then AMQP support makes it out of the sandbox.