Uploaded image for project: 'Spring AMQP'
  1. Spring AMQP
  2. AMQP-570

SimpleAmqpHeaderMapper does not handle org.springframework.util.MimeType

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Complete
    • Affects Version/s: 1.5.3
    • Fix Version/s: 1.5.4, 1.6 M1
    • Component/s: Core
    • Labels:
    • Environment:
      spring-amqp-1.5.3-RELEASE
      spring-messaging-4.2.4-RELEASE

      Description

      In my case I'm sending messages using Spring messaging, with a custom converter based on org.springframework.messaging.converter.AbstractMessageConverter. This class (and the other converters I've looked at in Spring messaging) seem to all use org.springframework.util.MimeType for encoding the content type, so it seems spring-amqp should handle that case in SimpleAmqpHeaderMapper.extractContentTypeAsString.

      Currently it logs a warning and ignores the content type header. However due to a related bug it does pick up the contentType header further down in fromHeaders and treats it as a custom header (as for some reason org.springframework.amqp.support.AmqpHeaders.CONTENT_TYPE doesn't use the "amqp_" prefix).

      It seems to me the correct behaviour would be to

      1. handle in org.springframework.util.MimeType extractContentTypeAsString
      2. exclude contentType from custom header processing

      Links: https://jira.spring.io/browse/INT-2713

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              grussell Gary Russell
              Reporter:
              ksperling Karsten Sperling
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: