Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id E78B3200CBD for ; Thu, 22 Jun 2017 06:25:10 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id E5D2E160BF0; Thu, 22 Jun 2017 04:25:10 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 32958160BD5 for ; Thu, 22 Jun 2017 06:25:09 +0200 (CEST) Received: (qmail 80992 invoked by uid 500); 22 Jun 2017 04:25:07 -0000 Mailing-List: contact commits-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@activemq.apache.org Delivered-To: mailing list commits@activemq.apache.org Received: (qmail 80982 invoked by uid 99); 22 Jun 2017 04:25:07 -0000 Received: from Unknown (HELO svn01-us-west.apache.org) (209.188.14.144) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 22 Jun 2017 04:25:07 +0000 Received: from svn01-us-west.apache.org (localhost [127.0.0.1]) by svn01-us-west.apache.org (ASF Mail Server at svn01-us-west.apache.org) with ESMTP id 610973A0051 for ; Thu, 22 Jun 2017 04:25:05 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1014349 - in /websites/production/activemq/content: advisory-message.html cache/main.pageCache Date: Thu, 22 Jun 2017 04:25:03 -0000 To: commits@activemq.apache.org From: buildbot@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20170622042506.610973A0051@svn01-us-west.apache.org> archived-at: Thu, 22 Jun 2017 04:25:11 -0000 Author: buildbot Date: Thu Jun 22 04:25:03 2017 New Revision: 1014349 Log: Production update by buildbot for activemq Modified: websites/production/activemq/content/advisory-message.html websites/production/activemq/content/cache/main.pageCache Modified: websites/production/activemq/content/advisory-message.html ============================================================================== --- websites/production/activemq/content/advisory-message.html (original) +++ websites/production/activemq/content/advisory-message.html Thu Jun 22 04:25:03 2017 @@ -82,7 +82,7 @@ -

ActiveMQ supports advisory messages which allows you to watch the system using regular JMS messages. Currently we have advisory messages that support

  • consumers, producers and connections starting and stopping
  • temporary destinations being created and destroyed
  • messages expiring on topics and queues
  • brokers sending messages to destinations with no consumers.
  • connections starting and stopping

Advisory messages can be thought as some kind of administrative channel where you receive information regarding what is happening on your JMS provider along with what's happening with producers, consumers and destinations. When you look at a broker via JMX you will see the advisory topics prefixed with ActiveMQ.Advisory..

Every Advisory has the message type 'Advisory' and some predefined message properties:

Property

Type

Description

Version

originBrokerId

StringProperty

The id of the broker where the advisory originated.

5.x

originBrokerName

StringProperty

The name of the broker where the advisory originated.

5.x

originBrokerURL

StringProperty

The first URL of the broker where the advisory originated.

5.2

In addition, some messages carry a Command object - which carries more information for the advisory - e.g.

A subscription to each of the destination returns an ActiveMQMessage. Specific DataStructure objects, e.g.,. ConsumerInfo, ProducerInfo, ConnectionInfo can be retrieved using ActiveMQMessage.getDataStructure().

F or example:

+

ActiveMQ supports advisory messages which allows you to watch the system using regular JMS messages. Currently we have advisory messages that support

  • consumers, producers and connections starting and stopping
  • temporary destinations being created and destroyed
  • messages expiring on topics and queues
  • brokers sending messages to destinations with no consumers.
  • connections starting and stopping

Advisory messages can be thought as some kind of administrative channel where you receive information regarding what is happening on your JMS provider along with what's happening with producers, consumers and destinations. When you look at a broker via JMX you will see the advisory topics prefixed with ActiveMQ.Advisory..

Every Advisory has the message type 'Advisory' and some predefined message properties:

Property

Type

Description

Version

originBrokerId

StringProperty

The id of the broker where the advisory originated.

5.x

originBrokerName

StringProperty

The name of the broker where the advisory originated.

5.x

originBrokerURL

StringProperty

The first URL of the broker where the advisory originated.

5.2

In addition, some messages carry a Command object, which carries additional information about the nature of the advisory, e.g., a subscription to each of the destination returns an ActiveMQMessage. Specific DataStructure objects, e.g.,. ConsumerInfo, ProducerInfo, ConnectionInfo can be retrieved using ActiveMQMessage.getDataStructure().

For example:

Destination advisoryDestination = AdvisorySupport.getProducerAdvisoryTopic(destination)
 MessageConsumer consumer = session.createConsumer(advisoryDestination);
 consumer.setMessageListener(this);
@@ -102,15 +102,17 @@ public void onMessage(Message msg){
 

The following advisory topics are supported

Client based advisories

Tip

These are always generated.

Advisory Topics

Description

Properties

Data Structure

ActiveMQ.Advisory.Connection

Connection start & stop messages.

 

ConnectionInfoRemoveInfo

ActiveMQ.Advisory.Producer.Queue

Producer start & stop messages on a Queue.

String='producerCount' - the number of producers

ProducerInfo

ActiveMQ.Advisory.Producer.Topic

Producer start & stop messages on a Topic.

String='producerCount' - the numbe r of producers

ProducerInfo

ActiveMQ.Advisory.Consumer.Queue

Consumer start & stop messages on a Queue.

String='consumerCount' - the number of Consumers

ConnectionInfoRemoveInfo

ActiveMQ.Advisory.Consumer.Topic

Consumer start & stop messages on a Topic.

String='consumerCount' - the number of Consumers

ConnectionInfo, RemoveInfo

Note that the consumer start/stop advisory messages also have a consumerCount header to indicate the number of active consumers on the destination when the advisory message was sent. This means you can use the following selector to be notified when there are no active consumers on a given destination:

consumerCount = 0
 
-

Destination and Message based advisories

< /tbody>

Advisory Topics

Description

Properties

Data Structure

Default

PolicyEntry Property

ActiveMQ.Advisory.Queue

Queue create & destroy.

null

DestinationInfo

true

none

ActiveMQ.Advisory.Topic

Topic create & destroy.

null

DestinationInfo

true

none

ActiveMQ.Advisory.TempQueue

Temporary Queue create & destroy.

null

DestinationInfo

true

none

ActiveMQ.Advisory.TempTopic

Temporary Topic create & destroy.

null

DestinationInfo

true

none

ActiveMQ.Advisory.Expired.Queue

Expired messages on a Queue.

String='orignalMessageId' - the expired id

Message

true

none

ActiveMQ.Advisory.Expired.Topic

Expired messages on a Topic.

String='orignalMessageId' - the expired id

Message

true

none

ActiveMQ.Advisory.NoConsumer.Queue

No c onsumer is available to process messages being sent on a Queue.

null

Message

false

sendAdvisoryIfNoConsumers

ActiveMQ.Advisory.NoConsumer.Topic

No consumer is available to process messages being sent on a Topic.

null

Message

false

sendAdvisoryIfNoConsumers

Tip

NoConsumer topic advisories are sent only for non-persistent messages.

New advisories in version 5.2

Advisory Topics

Description

Properties

Data Structure

Default

PolicyEntry Property

ActiveMQ.Advisory.SlowConsumer.Queue

Slow Queue Consumer.

String='consumerId' - the consumer id

ConsumerInfo

false

advisoryForSlowConsumers

ActiveMQ.Advisory.SlowConsumer.Topic

Slow Topic Consumer.

String='consumerId' - the consumer id

ConsumerInfo

false

advisoryForSlowConsumers

ActiveMQ.Advisory.FastProducer.Queue

Fast Queue producer.

String='producerId' - the producer id

ProducerInfo

false

advisdoryForFastProducers

ActiveMQ.Advisory. FastProducer.Topic

Fast Topic producer.

String='consumerId'' - the producer id

ProducerInfo

false

advisdoryForFastProducers

ActiveMQ.Advisory.MessageDiscarded.Queue

Message discarded.

String='orignalMessageId' - the discarded id

Message

false

advisoryForDiscardingMessages

ActiveMQ.Advisory.MessageDiscarded.Topic

Message discarded.

String='orignalMessageId' - the discarded id

Message

false

advisoryForDiscardingMessages

ActiveMQ.Advisory.MessageDelivered.Queue

Message delivered to the broker.

String='orignalMessageId' - the delivered id

Message

false

advisoryForDelivery

ActiveMQ.Advisory.MessageDelivered.Topic

Message delivered to the broker.

String='orignalMessageId' - the delivered id

Message

false

advisoryForDelivery

ActiveMQ.Advisory.MessageConsumed.Queue

Message consumed by a client.

String='orignalMessageId' - the delivered id

Message

false

advisoryForConsumed

ActiveMQ.Advisory.MessageConsumed.Topic

Message consumed by a client.

String='orignalMessageId' - the delivered id

Message

false

advisoryForConsumed

ActiveMQ.Advisory.FULL

A Usage resou rce is at its limit.

String='usageName' - the name of Usage resource

null

false

advisoryWhenFull

ActiveMQ.Advisory.MasterBroker

A broker is now the master in a master/slave configuration.

null

null

true

none

New Advisories in 5.4

Advisory Topics

Description

Properties

Data Structure

Default

PolicyEntry Property

ActiveMQ.Advisory.MessageDLQd.Queue

Message sent to DLQ.

String='orignalMessageId' - the delivered id

Message

Always on

advisoryForConsumed

ActiveMQ.Advisory.MessageDLQd.Topic

Message sent to DLQ.

String='orignalMessageId' - the delivered id

Message

Always on

advisoryForConsumed

Network bridge advisories

Starting with ActiveMQ version 5.5 you can watch advisory topics for events related to the status of network bridges. You can get advisory messages when the network bridge is started or stopped.

Advisory Topics

Description

properties

Data Structure

Default

ActiveMQ.Advisory.NetworkBridge

Network bridge being stopped or started.

Boolean="started" - true if bridge is started, false if it is stopped.
Boolean="createdByDuplex"true if the bridge is created by remote network connector.

BrokerInfo - provides data of the remote broker

Always on

Enabling Advisories Disabled by Default

The advisories that are not turned on by default (see the last column) can be enabled on a PolicyEntry in the ActiveMQ Broker Configuration - e.g. - to enable a message consumed advisory you can configure the following:

+

Destination and Message based advisories

Advisory Topics

Description

Properties

Data Structure

Default

PolicyEntry Property

ActiveMQ.Advisory.Queue

Queue create & destroy.

null

DestinationInfo

true

none

ActiveMQ.Advisory.Topic

Topic create & destroy.

null

DestinationInfo

true

none

ActiveMQ.Advisory.TempQueue

Temporary Queue create & destroy.

null

< code>DestinationInfo

true

none

ActiveMQ.Advisory.TempTopic

Temporary Topic create & destroy.

null

DestinationInfo

true

none

ActiveMQ.Advisory.Expired.Queue

Expired messages on a Queue.

String='orignalMessa geId' - the expired id

Message

true

none

ActiveMQ.Advisory.Expired.Topic

Expired messages on a Topic.

String='orignalMessageId' - the expired id

Message

true

none

ActiveMQ.Advisory.NoConsumer.Queue

No consumer is available to process messages being sent on a Queue.

null

Message

false

sendAdvisoryIfNoConsumers

ActiveMQ.Advisory.NoConsumer.Topic

No consumer is available to process messages being sent on a Topic.

null

Message

false

sendAdvisoryIfNoConsumers

Tip

NoConsumer topic advisories are sent only for non-persistent messages.

New advisories in version 5.2

< td colspan="1" rowspan="1" class="confluenceTd">

ActiveMQ.Advisory.SlowConsumer.Queue

Advisory Topics

Description

Properties

Data Structure

Default

PolicyEntry Property

Slow Queue Consumer.

String='consumerId' - the consumer id

ConsumerInfo

false

advisoryForSlowConsumers

ActiveMQ.Advisory.SlowConsumer.Topic

Slow Topic Consumer.

String='consumerId' - the consumer id

ConsumerInfo

false

advisoryForSlowConsumers

ActiveMQ.Advisory.FastProducer.Queue

Fast Queue producer.

String='producerId' - the producer id

ProducerInfo

false

advisdoryForFastProducers

ActiveMQ.Advisory. FastProducer.Topic

Fast Topic producer.

String='consumerI d'' - the producer id

ProducerInfo

false

advisdoryForFastProducers

ActiveMQ.Advisory.MessageDiscarded.Queue

Message discarded.

String='orignalMessageId' - the discarded id

Message

false

advisoryForDiscardingMessages

ActiveMQ.Advisory.MessageDiscarded.Topic

Message discarded.

String='orignalMessageId' - the discarded id

Message

false

advisoryForDiscardingMessages

ActiveMQ.Advisory.MessageDelivered.Queue

Message delivered to the broker.

String='orignalMessageId' - the delivered id

Message

false

advisoryForDelivery

ActiveMQ.Advisory.MessageDelivered.Topic

Message delivered to the broker.

String='orignalMessageId' - the delivered id

Message

false

advisoryForDelivery

ActiveMQ.Advisory.MessageConsumed.Queue

Message consumed by a client.

String='orignalMessageId' - the delivered id

Message

false

advisoryForConsumed

ActiveMQ.Advisory.MessageConsumed.Topic

Message consumed by a client.

String='orignalMessageId' - the delivered id

Message

false

advisoryForConsumed

ActiveMQ.Advisory.FULL

A Usag e resource is at its limit.

String='usageName' - the name of Usage resource

null

false

advisoryWhenFull

ActiveMQ.Advisory.MasterBroker

A broker is now the master in a master/slave configuration.

null

null

true

none

New Advisories in 5.4

Advisory Topics

Description

Properties

Data Structure

Default

PolicyEntry Property

ActiveMQ.Advisory.MessageDLQd.Queue

Message sent to DLQ.

String='orignalMessageId' - the delivered id

Message

Always on

advisoryForConsumed

ActiveMQ.Advisory.MessageDLQd.Topic

Message sent to DLQ.

String='orignalMessageId' - the delivered id

Message

Always on

advisoryForConsumed

Network bridge advisories

Starting with ActiveMQ version 5.5 you can watch advisory topics for events related to the status of network bridges. You can get advisory messages when the network bridge is started or stopped.

Advisory Topics

Description

Properties

Data Structure

Default

ActiveMQ.Advisory.NetworkBridge

Network bridge being stopped or started.

Boolean="started" - true if bridge is started, false if it is stopped.
Boolean="createdByDuplex"true if the bridge is created by remote network connec tor.

BrokerInfo - provides data of the remote broker

Always on

Enabling Advisories Disabled by Default

The advisories that are not turned on by default (see the last column) can be enabled on a PolicyEntry in the ActiveMQ Broker Configuration, e.g., to enable a message consumed advisory you can configure the following:

<destinationPolicy>
-   <policyMap><policyEntries> 
-      <policyEntry topic=">" advisoryForConsumed="true"/>
-   </policyEntries></policyMap>
+    <policyMap>
+       <policyEntries> 
+           <policyEntry topic=">" advisoryForConsumed="true"/>
+       </policyEntries>
+    </policyMap>
 </destinationPolicy>
 

Hint

The > character matches all topics - you can use wild-card matches for setting a destination policy - see Wildcards

Disabling Advisory Messages

The use of advisory messages incurs a small overhead in terms of memory and connection resources that is related to the number of destinations in your system. In some cases it can make sense to disable all advisories.

Advisories need to be disabled both on the Broker, via XML Configuration

-
<broker advisorySupport="false">...
+
<broker advisorySupport="false">
 

or from java code:

BrokerService broker = new BrokerService();

Modified: websites/production/activemq/content/cache/main.pageCache
==============================================================================
Binary files - no diff available.