Results 1 to 3 of 3

Thread: Issue of JsonMessageConverter

  1. #1
    Join Date
    Aug 2011
    Posts
    3

    Default 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. #2
    Join Date
    Oct 2005
    Location
    Boston, MA
    Posts
    2,840

    Default

    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

  3. #3
    Join Date
    Aug 2011
    Posts
    3

    Default

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

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •