Announcement Announcement Module
Collapse
No announcement yet.
Issue of JsonMessageConverter Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Issue of JsonMessageConverter

    Hi.
    I'm currently using Spring AMQP 1.0.0.RC3 and RabbitMQ for consumer applications.
    Publisher applications were written by other languages(Ruby,Python) and I can't modify it for some reasons.
    They send message without "__TypeId__" header.
    When I receive this message, I want to handle it by using JsonMessageConverter.
    But JsonMessageConverter needs "__TypeId__" header to determine target class.
    In this case, what do I need to do?

  • #2
    The JsonMessageConverter has a 'classMapper' property that you can set. The default implementation looks for a "__TypeId__" property, but you can do anything you want there.

    Hope that helps.
    -Mark

    Comment


    • #3
      THX!
      Currently I use a custom ClassMapper as the way you said,and it works fine.
      Thank you!

      Comment

      Working...
      X