第5章 設定


Java Message Service (JMS) API は、メッセージングクライアントがメッセージングサーバーと通信する方法を指定します。メッセージのデスティネーションや接続ファクトリなどのメッセージングサービスがどのように定義され、実装されるかは、JMS プロバイダーによって異なります。JBoss Messaging にはサービス設定用の独自のファイルがあります。
本章では JBoss Messaging で使用可能な各種サービスの設定方法について説明します。これらのサービスはクライアントのアプリケーションに JMS API レベルのサービスを提供するため連携して動作します。
JBoss Messaging の設定は数種の設定ファイルで分かれています。提供されるサービスの種類に応じて、設定情報は messaging-service.xmlremoting-bisocket-service.xml<your database type>-persistence-service.xmlconnection-factories-service.xmldestinations-service.xml 間で分かれています。これらのファイルはすべて $JBOSS_HOME/server/$PROFILE/deploy/messaging のディレクトリにあります。
AOP インターセプターのスタックは aop-messaging-client.xml (クライアント側の動作用) と aop-messaging-server.xml (サーバー側の動作用) で設定することができます。通常はこれらのファイルを変更する必要はありませんが、必要がないインターセプターがある場合はそれを削除してパフォーマンスを向上させることができます。セキュリティインターセプターを削除する場合は、セキュリティの影響を十分に考慮してください。

5.1. ServerPeer の設定

ServerPeer は JBoss Messaging JMS ファサードの中核です。$JBOSS_HOME/server/$PROFILE/deploy/messaging/messaging-service.xml を編集してその動作を設定できます。
すべての JBoss Messaging サービスは ServerPeer を基にしています。
以下は Server Peer の設定例です。この例では Server Peer の属性のすべての値は指定されていません。
<!-- ServerPeer MBean configuration
    ============================== -->

<mbean code="org.jboss.jms.server.ServerPeer"
  name="jboss.messaging:service=ServerPeer"
  xmbean-dd="xmdesc/ServerPeer-xmbean.xml">

  <!--The unique id of the server peer - in a cluster each node 
      MUST have a unique value - must be an integer-->

  <attribute name="ServerPeerID">
    ${jboss.messaging.ServerPeerID:0}
  </attribute>
  
  <!--The default JNDI context to use for queues when they are 
      deployed without specifying one--> 
  
  <attribute name="DefaultQueueJNDIContext">/queue</attribute>
  
  <!--The default JNDI context to use for topics when they are 
      deployed without specifying one --> 
  
  <attribute name="DefaultTopicJNDIContext">/topic</attribute>

  <attribute name="PostOffice">
    jboss.messaging:service=PostOffice
  </attribute>

  <!-- The default Dead Letter Queue (DLQ) to use for destinations.
       This can be overridden on a per destinatin basis -->
  
  <attribute name="DefaultDLQ">
    jboss.messaging.destination:service=Queue,name=DLQ
  </attribute>
  
  <!--The default maximum number of times to attempt delivery of a 
      message before sending to the DLQ (if configured).
      This can be overridden on a per destination basis-->
  
  <attribute name="DefaultMaxDeliveryAttempts">10</attribute>
  
  <!--The default Expiry Queue to use for destinations. This can 
      be overridden on a per destinatin basis-->
  
  <attribute name="DefaultExpiryQueue">
    jboss.messaging.destination:service=Queue,name=ExpiryQueue
  </attribute>
  
  <!--The default redelivery delay to impose. This can be overridden 
      on a per destination basis -->
  
  <attribute name="DefaultRedeliveryDelay">0</attribute>
  
  <!--The periodicity of the message counter manager enquiring on 
      queues for statistics-->
  
  <attribute name="MessageCounterSamplePeriod">5000</attribute>
  
  <!--The maximum amount of time for a client to wait for failover 
      to start on the server side after it has detected failure-->
  
  <attribute name="FailoverStartTimeout">60000</attribute>
  
  <!--The maximum amount of time for a client to wait for failover 
      to complete on the server side after it has detected failure-->
  
  <attribute name="FailoverCompleteTimeout">300000</attribute>

  <attribute name="StrictTck">false</attribute>
  
  <!--The maximum number of days results to maintain in the message 
      counter history-->
  
  <attribute name="DefaultMessageCounterHistoryDayLimit">-1</attribute>
  
  <!--The name of the connection factory to use for creating 
      connections between nodes to pull messages-->
  
  <attribute name="ClusterPullConnectionFactoryName">
    jboss.messaging.connectionfactory:service=ClusterPullConnectionFactory
  </attribute>
  
  <!--When redistributing messages in the cluster. Do we need to 
      preserve the order of messages received
      by a particular consumer from a particular producer? -->
        
  <attribute name="DefaultPreserveOrdering">false</attribute>
  
  <!-- Max. time to hold previously delivered messages back waiting for
       clients to reconnect after failover -->
  
  <attribute name="RecoverDeliveriesTimeout">300000</attribute>
  
  <!-- Set to true to enable message counters that can be viewed via JMX -->
  
  <attribute name="EnableMessageCounters">false</attribute>
  
  <!-- The password used by the message sucker connections to create connections.
       THIS SHOULD ALWAYS BE CHANGED AT INSTALL TIME TO SECURE SYSTEM
  <attribute name="SuckerPassword"></attribute>
  -->

  <!-- The name of the server aspects configuration resource
  <attribute name="ServerAopConfig">aop/jboss-aop-messaging-server.xml</attribute>
  -->
  <!-- The name of the client aspects configuration resource
    <attribute name="ClientAopConfig">aop/jboss-aop-messaging-client.xml</attribute>
  -->

  <depends optional-attribute-name="PersistenceManager">
    jboss.messaging:service=PersistenceManager
  </depends>
  
  <depends optional-attribute-name="JMSUserManager">
    jboss.messaging:service=JMSUserManager
  </depends>
  
  <depends>jboss.messaging:service=Connector,transport=bisocket</depends>
  <depends optional-attribute-name="SecurityStore"
    proxy-type="org.jboss.jms.server.SecurityStore">
      jboss.messaging:service=SecurityStore
  </depends>
</mbean>
Copy to Clipboard Toggle word wrap
トップに戻る
Red Hat logoGithubredditYoutubeTwitter

詳細情報

試用、購入および販売

コミュニティー

Red Hat ドキュメントについて

Red Hat をお使いのお客様が、信頼できるコンテンツが含まれている製品やサービスを活用することで、イノベーションを行い、目標を達成できるようにします。 最新の更新を見る.

多様性を受け入れるオープンソースの強化

Red Hat では、コード、ドキュメント、Web プロパティーにおける配慮に欠ける用語の置き換えに取り組んでいます。このような変更は、段階的に実施される予定です。詳細情報: Red Hat ブログ.

会社概要

Red Hat は、企業がコアとなるデータセンターからネットワークエッジに至るまで、各種プラットフォームや環境全体で作業を簡素化できるように、強化されたソリューションを提供しています。

Theme

© 2025 Red Hat