Class HeaderMessageInterceptorStrategy
java.lang.Object
org.apache.activemq.broker.region.policy.HeaderMessageInterceptorStrategy
- All Implemented Interfaces:
MessageInterceptorStrategy
Enforce message policies for JMS Header values
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanbooleanbooleanvoidprocess(ProducerBrokerExchange producerBrokerExchange, org.apache.activemq.command.Message message) When a PolicyEntry is configured with a MessageInterceptorStrategy, the process method is invoked with the current ProducerBrokerExchange and Message before the message is stored in any destination cache or persistence store.voidsetExpirationCeiling(long expirationCeiling) setter method for expirationCeilingvoidsetForceDeliveryMode(boolean forceDeliveryMode) voidsetForceExpiration(boolean forceExpiration) voidsetFutureOnly(boolean futureOnly) voidsetPersistent(boolean persistent) voidsetProcessNetworkMessages(boolean processNetworkMessages) voidsetProcessNetworkMessages(Boolean processNetworkMessages) voidsetZeroExpirationOverride(long ttl) setter method for zeroExpirationOverride
-
Constructor Details
-
HeaderMessageInterceptorStrategy
public HeaderMessageInterceptorStrategy()
-
-
Method Details
-
setZeroExpirationOverride
public void setZeroExpirationOverride(long ttl) setter method for zeroExpirationOverride -
setExpirationCeiling
public void setExpirationCeiling(long expirationCeiling) setter method for expirationCeiling -
setFutureOnly
public void setFutureOnly(boolean futureOnly) -
setProcessNetworkMessages
-
process
public void process(ProducerBrokerExchange producerBrokerExchange, org.apache.activemq.command.Message message) throws jakarta.jms.MessageFormatRuntimeException Description copied from interface:MessageInterceptorStrategyWhen a PolicyEntry is configured with a MessageInterceptorStrategy, the process method is invoked with the current ProducerBrokerExchange and Message before the message is stored in any destination cache or persistence store. Implementations may reference data from the ProducerBrokerExchange and may check or modify headers, properties, body or other metadata on the Message. Any change to the message must adhere to OpenWire and ActiveMQ requirements or risk issues with memory usage, compatibility, and general correct functioning. Implementations shall not copy, or clone the message. Implementations may throw a MessageFormatRuntimeException that is returned to the client to indicate a message should not be added to the queue.- Specified by:
processin interfaceMessageInterceptorStrategy- Throws:
jakarta.jms.MessageFormatRuntimeException
-
setForceDeliveryMode
public void setForceDeliveryMode(boolean forceDeliveryMode) -
isForceDeliveryMode
public boolean isForceDeliveryMode() -
setForceExpiration
public void setForceExpiration(boolean forceExpiration) -
isForceExpiration
public boolean isForceExpiration() -
setPersistent
public void setPersistent(boolean persistent) -
isPersistent
public boolean isPersistent() -
setProcessNetworkMessages
public void setProcessNetworkMessages(boolean processNetworkMessages) -
isProcessNetworkMessages
public boolean isProcessNetworkMessages()
-