Class AbstractMessageConverter

    • Constructor Detail

      • AbstractMessageConverter

        public AbstractMessageConverter()
    • Method Detail

      • setCreateMessageIds

        public void setCreateMessageIds​(boolean createMessageIds)
        Flag to indicate that new messages should have unique identifiers added to their properties before sending. Default false.
        Parameters:
        createMessageIds - the flag value to set
      • isCreateMessageIds

        protected boolean isCreateMessageIds()
        Flag to indicate that new messages should have unique identifiers added to their properties before sending.
        Returns:
        the flag value
      • createMessage

        protected Message createMessage​(Object object,
                                        MessageProperties messageProperties,
                                        @Nullable
                                        Type genericType)
        Crate a message from the payload object and message properties provided. The message id will be added to the properties if necessary later.
        Parameters:
        object - the payload
        messageProperties - the message properties (headers)
        genericType - the type to convert from - used to populate type headers.
        Returns:
        a message
        Since:
        2.1
      • createMessage

        protected abstract Message createMessage​(Object object,
                                                 MessageProperties messageProperties)
        Crate a message from the payload object and message properties provided. The message id will be added to the properties if necessary later.
        Parameters:
        object - the payload.
        messageProperties - the message properties (headers).
        Returns:
        a message.