이 콘텐츠는 선택한 언어로 제공되지 않습니다.

Chapter 23. Queue Attributes


Queue attributes can be set in one of two ways; by configuring them using the configuration file or by using the core API. This chapter will explain how to configure each attribute and what effect the attribute has.

23.1. Predefined Queues

Queues can be predefined through configuration at a core level or at a JMS level. First look at a JMS level.
JMS Level

The following shows a queue predefined in the JBOSS_DIST/jboss-as/server/<PROFILE>/deploy/hornetq/hornetq-jms.xml configuration file.

<queue name="selectorQueue">
   <entry name="/queue/selectorQueue"/>
   <selector string="color='red'"/>
   <durable>true</durable>
</queue>
Copy to Clipboard Toggle word wrap
This name attribute of <queue> defines the name of the queue. When doing this at a JMS level a naming convention is followed so the actual name of the core queue will be jms.queue.selectorQueue.
The mandatory <entry> element configures the name used to bind the queue to JNDI. <queue> can contain multiple <entry> elements to bind the same queue to different names.
The optional <selector> element defines what JMS message selector the predefined queue will have. Only messages that match the selector will be added to the queue. When omitted from the <queue> the default value is null.
The optional <durable> element specifies whether the queue is persisted. When omitted from the <queue> the default value is true.
Core Level

A queue can be predefined at a core level in the <JBOSS_HOME>/jboss-as/server/<PROFILE>/deploy/hornetq/hornetq-configuration.xml file.

<queues>     
   <queue name="jms.queue.selectorQueue">
      <address>jms.queue.selectorQueue</address>
      <filter string="color='red'"/>
      <durable>true</durable>
</queues>
Copy to Clipboard Toggle word wrap
This is very similar to the JMS configuration, with the following exceptions:
  1. The name attribute of queue is the actual name used for the queue with no naming convention as in JMS.
  2. The address element defines what address is used for routing messages.
  3. There is no entry element.
  4. The filter uses the Core filter syntax (described in Chapter 12, Filter Expressions), not the JMS selector syntax.
맨 위로 이동
Red Hat logoGithubredditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 문서 정보

Red Hat을 사용하는 고객은 신뢰할 수 있는 콘텐츠가 포함된 제품과 서비스를 통해 혁신하고 목표를 달성할 수 있습니다. 최신 업데이트를 확인하세요.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

Theme

© 2025 Red Hat