TsgcWSPClient_STOMP_ActiveMQProperties › ActiveMQ_Options

ActiveMQ_Options Property

ActiveMQ-specific STOMP extensions added to the CONNECT frame, such as the durable activemq.client-id required to resume durable topic subscriptions.

Syntax

property ActiveMQ_Options: TsgcWSActiveMQSTOMP_Options read FActiveMQ_Options write SetActiveMQ_Options;

Default Value

ClientId=''

Remarks

This container groups JMS-style switches that the ActiveMQ STOMP adapter recognises in addition to the generic Options virtual host. Currently it exposes ClientId, which is emitted as the activemq.client-id header on CONNECT and identifies the logical JMS client so the broker can bind durable topic subscriptions to it. Leave ClientId empty for anonymous sessions that only use plain queues and transient topics; set it to a stable, unique value when you need durable subscriptions (SubscribeTopic with aDurable:=True) that survive reconnects. Related ActiveMQ extensions are exposed on other objects rather than here: prefetch, dispatch-async, no-local, exclusive-consumer and JMS selectors live on the TsgcWSActiveMQSTOMP_Queue_Options passed to SubscribeEx/SubscribeTopic/SubscribeQueue (and map to activemq.prefetchSize, activemq.dispatchAsync, activemq.noLocal, activemq.exclusive and selector), while JMS message headers such as persistent, priority, expires, correlation-id, JMSXGroupID, JMSXGroupSeq, reply-to and type are set through TsgcWSActiveMQSTOMP_Message_Options on PublishEx/PublishTopic/PublishQueue.

Example


STOMP := TsgcWSPClient_STOMP_ActiveMQ.Create(nil);
STOMP.Client := WSClient;
STOMP.ActiveMQ_Options.ClientId := 'sgc-consumer-01';
WSClient.Active := True;
STOMP.SubscribeTopic('prices', True);

Back to Properties