Sun Java System Message Queue 4.3 Administration Guide

Step 5 (HTTP and HTTPS): Configuring the Connection Service

HTTP/HTTPS support is not activated for a broker by default, so before connecting using these protocols, you need to reconfigure the broker to activate the httpjms or httpsjms connection service. Table C–2 shows broker configuration properties pertaining specifically to these two connection services. Once reconfigured, the broker can be started normally, as described under Starting Brokers.

Table C–2 Broker Configuration Properties for the httpjms and httpsjms Connection Services

Property 

Type 

Default Value 

Description 

imq.httpjms.http.servletHostimq.httpsjms.https.servletHost

String 

localhost

Host name or IP address of (local or remote) host running tunnel servlet

imq.httpjms.http.servletPortimq.httpsjms.https.servletPort

Integer 

httpjms: 7675httpsjms: 7674

Port number of tunnel servlet 

imq.httpjms.http.pullPeriodimq.httpsjms.https.pullPeriod

Integer 

-1 

Interval, in seconds, between client HTTP/HTTPS requests

If zero or negative, the client will keep one request pending at all times.  

imq.httpjms.http.connectionTimeoutimq.httpsjms.https.connectionTimeout

Integer 

60 

Tunnel servlet timeout interval 

ProcedureTo Activate the httpjms or httpsjms Connection Service

  1. Open the broker’s instance configuration file.

    The instance configuration file is named config.properties and is located in a directory identified by the name of the broker instance to which it belongs:

       …/instances/instanceName/props/config.properties
    

    (See Appendix A, Platform-Specific Locations of Message Queue Data for the location of the instances directory.)

  2. Add httpjms or httpsjms to the list of active connection services.

    Add the value httpjms or httpsjms to the imq.service.activelist property: for example,

       imq.service.activelist=jms,admin,httpjms
    

    or

       imq.service.activelist=jms,admin,httpsjms
    
  3. Set any other HTTP/HTTPS-related configuration properties as needed.

    At startup, the broker looks for an application server or Web server and an HTTP or HTTPS tunnel servlet running on its local host machine. If necessary, you can reconfigure the broker to access a remote tunnel servlet instead, by setting the servletHost and servletPort properties appropriately (see Table C–2): for example,

       imq.httpjms.http.servletHost=helios
       imq.httpjms.http.servletPort=7675
    

    You can also improve performance by reconfiguring the connection service’s pullPeriod property. This specifies the interval, in seconds, at which each client issues HTTP/HTTPS requests to pull messages from the broker. With the default value of -1, the client will keep one such request pending at all times, ready to pull messages as fast as possible. With a large number of clients, this can cause a heavy drain on server resources, causing the server to become unresponsive. Setting the pullPeriod property to a positive value configures the client’s HTTP/HTTPS transport driver to wait that many seconds between pull requests, conserving server resources at the expense of increased response times to clients.

    The connectionTimeout property specifies the interval, in seconds, that the client runtime waits for a response from the HTTP/HTTPS tunnel servlet before throwing an exception, as well as the time the broker waits after communicating with the tunnel servlet before freeing a connection. (A timeout is necessary in this case because the broker and the tunnel servlet have no way of knowing if a client that is accessing the tunnel servlet has terminated abnormally.)