Class SafeMessageIdProperty


  • public class SafeMessageIdProperty
    extends MessageIdProperty
    Copies the AdaptrisMessage uniqueId to and from MSMQ Message fields.

    In some environments the System.Messaging.Message.Id property (and CorrelationId property) may not be safe to use as the AdaptrisMessage ID (it may contain a \ which will cause problems when writing out to the filesystem. This class simply replaces all invalid characters with a - instead.

    Note that System.Messaging.Message does not allow you to set the Id property; it is always auto-assigned. As a result, if you attempt to map the AdaptrisMessage ID to this field, it will fail.

    See Also:
    MessageIdProperty

    In the adapter configuration file this class is aliased as javonet-msmq-safe-message-id which is the preferred alternative to the fully qualified classname when building your configuration.

    • Constructor Detail

      • SafeMessageIdProperty

        public SafeMessageIdProperty()
    • Method Detail

      • format

        protected java.lang.String format​(java.lang.String name)
        Overrides:
        format in class MessageIdProperty