How to filter artemis.log messages in A-MQ 7.11

Solution Verified - Updated -

Issue

  • The customer wants to filter any log entry that has a "Duplicate message" on the log entry contents, like the following
2024-03-01 07:48:54,993 WARN  [org.apache.activemq.artemis.core.server] AMQ222059: Duplicate message detected - message will not be routed. Message information:
CoreMessage[messageID=320,durable=true,userID=null,priority=0, timestamp=Fri Mar 01 07:48:54 COT 2024,expiration=0, durable=true, address=foo,size=143,properties=TypedProperties[_AMQ_DUPL_ID=2,_AMQ_ROUTE_TO=[0000 0000 0000 004C),bytesAsLongs(76]]]@1693120271
  • Adding a log filter to the $BROKER_INSTANCE/etc/log4j2.properties using the message code, as in the next example, does not work:
#added filter
appender.log_file.filter.1.type = RegexFilter
appender.log_file.filter.1.regex = *.AMQ222059.*
appender.log_file.filter.1.onMatch = DENY
appender.log_file.filter.1.onMismatch = ACCEPT

Environment

  • A-MQ 7.11

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content