Total Pageviews

Thursday, September 30, 2010


What are the different modes of installation in Ems?
a. GUI mode
b. Console mode
c. Silent mode

What are the messaging models supported by JMS?
a. Point-to-point
b. Publish-subscribe
c. Multicast

What are the destinations in EMS/JMS and their differences?
Queues: point-point communication. Any number of producers and consumers can exist. At any time and situation each message is taken by only one consumer.
Exclusive: only the first consumer who picks up the first message can take the rest of the messages (used if u wants only one consumer).
Non-exclusive: where any number of consumers can exist. Used for load balancing.
Topics: publish-subscribe.
Any number of publishers and subscribers can exist. Each message can be taken by any number of consumers (radio).

In how many ways can a destination be created?
a. Static-created by user
b. Dynamic-created by ems server on the fly.
c. Temporary destinations.

Queues Vs Topics in TIBCO EMS
There are two major models for messaging supported by JMS: queues and topics. Queues are based on a point-to-point messaging model. Topics make use of the new publish-and-subscribe messaging model.

Regardless whether queues or topics are used, the messages are not sent directly peer-to-peer. Messages are forwarded to a JMS infrastructure that is composed of one or more JMS servers. The servers are responsible for providing the quality-of-services to JMS and responsible for implementing all the components not addressed by JMS Specification.

When determining when to use queues versus topics consider the two fundamental messaging mechanisms. The first is point-to-point messaging, in which a message is sent by one publisher (sender) and received by one subscriber (receiver). The second is publish-subscribe messaging, in which a message is sent by one or more publishers and received by one or more subscribers. The messaging model as listed below will dictate when to use a queue or a topic:

One-to-one messaging Queue point-to-point
One-to-many messaging Topic publish-subscribe
Many-to-many messaging Topic publish-subscribe model

what is the Relationship between Temporary queue, queue, destination.
A Destination can be a Queue or Topic, which typically says static. Which means you physically create this queue.

I hope you know the definition for Queue which can static, dynamic or temporary.
Static represents physical creation.

Dynamic Represents, which will be created by receiver/sender application at run time, life span is limited, as long as there is messages or receivers, it will stay in server, if not it deletes.

Temporary Queue means, created by receiver to submit the response to EMS server or Sender to get the messages. this life span is immediate, but there is a hidden danger with these queues, as these might turn into orphan queues (please read other articles). there is a fix, which will go by 4.4.2 ems version

Difference between Exclusive and Non Exclusive Queues
you can define a queue as exclusive to make sure that all the messages are always sent to the same consumer, even if you have more than one connected to it. If you make it exclusive the rest of the consumers are "on standby" so if the primary fails another one is set as primary and starts receiving.

If you set them to non-exclusive (the default value) and you have more than one consumer connected to the queue the messages are delivered in a round robin fashion to balance the load.

What is the use of system queues?
system queues are undeleteable queues stored usualy undelivered messages (when you set JMS_TIBCO_PRESERVE_UNDELIVERED to true, in case the message exipres, you'll get it to $sys.undelivered) or other even driven messages if applicable.
More in use are sytem topics for monitoring and statistics, where is EMS publishing queue and server statistics and can be detailed to message content level.

dead Queue
In case of any failures in the messages to server, will be added to dead queue, which is kind of internal system queue, I strongly feel.
For ex: No memory trying to add message to dead queue.
Failure queuing message to add to dead queue

How do we distinguish dynamic queues with static queues?
Ans: dynamic queues have * before them.

what are the message storing mechanisms of queues?
Ans: persistent and non-persistent.
Persistent: messages are stored to external storage before sending.
Non-persistent: not stored to any external storage. The information will not be available for retrieval.

what are types of subscribers we can have for topics? Explain them in detail.
Ans: durable and non-durable subscribers.
In durable subscriptions the messages are stored so that even if the subscriber fails and comes back the messages can be retrieved.

What are the permissions that you can grant to users to access queues?
a. Receive
b. Send
c. Browse

What are the permissions that you can grant to users to access topics?
a. Subscribe
b. Publish
c. Durable
d. Use_durable

What is the difference between Queues and Topics?
• Guaranteed Service
• Only the Target gets the message (One message per Consumer)
• Uses Peer-to-Peer Mode to deliver messages
• Blocking
• Load Balancing is possible

• Reliable Service
• Everyone active gets the message (One message may Consumers)
• Uses Pub / Sub mode to deliver messages
• Non-Blocking
• Load Balancing is not Possible

What is the use of secured queues and topics?
Setting ‘secure’ property to queues/topics can restrict unauthorized users from publishing/sending and subscribing/receiving the messages.

What are acknowledgement modes and where do you set them and what is the applicability of each mode?
Ans:The acknowledge mode for incoming messages. Can be one of the following:
• Auto — the message is automatically acknowledged when it is received.
• Client —the message will be acknowledged at a later point by using the Confirm activity. If the message is not
confirmed before the process instance ends, the message is redelivered and a new process instance is
created to handle the new incoming message. Ensure that your process definition confirms the message
when using this acknowledge mode .
• TIBCO EMS Explicit Client Acknowledge — this mode behaves exactly the same as the Client mode, except the
session is not blocked and one session can handle all incoming messages
• Dups OK — the message is acknowledged automatically when it is received. JMS provides this mode for lazy
acknowledgement, but TIBCO BusinessWorks acknowledges messages upon receipt.
• Transactional — this mode is used when a transaction that can process JMS messages is included in the process
definition. The message is acknowledged when the transaction commits.

what is the structure of messages in JMS?
Ans: header(needed),
Header parameters:
JMS destination,
JMS message.

What is the purpose of JMS Queue receiver activity and Queue sender activity?
Ans: Starts a process when ever a new message comes into the specified queue.
A queue sender activity sends messages into the specified queue.

What is the potential problem with JMS Queue requestor?
Ans: When we specify a reply to queue there is a chance of other processes sending messages to the same queue
and the jms queue requestor interpreting that as the actual response and sending this wrong message to the client.

What is JMS queue requestor?
The JMS Queue Requestor activity is used to send a request to a JMS queue name and receive a response back from the JMS client

What is JMS topic requestor?
The JMS Topic Requestor activity is used to communicate with a JMS application’s request-response service. This service invokes an operation with input and output. The request is sent to a JMS topic and the JMS application returns the response to the request.

How to setup load balancing for Topics and queues?
Ans: We can achieve load balancing using bridging queues and topics.
Or Queues can be set non-exclusive so that any number of consumers can access the queue.

What are the different levels of load balancing in EMS and how would you do it?
Ans: server level and consumer level
Server: by having multiple servers.
Consumer: by creating consumer instances.

What are the differences between server load balancing & producer/consumer load balancing?
Point-to-Point : Non-exclusive queues are useful for balancing the load of incoming messages across multiple receivers.
Programs can use distributed queues for one-of-n certified delivery to a group of servers, in order to balance the load among the servers.
Rendezvous distributed queue software assigns each task to exactly one of the servers, while the group of servers and the distribution of tasks remains completely transparent to the client processes.

EMS Load balancing can be done in only one way on the consumer side, by using multiple subscribers/receivers to a same topic/queue, and which will be executed in round robin fashion. If we are connecting two different severs by using "|" symbol is not be load balancing, Consumers can not switch connections between two servers. By default, we will implement multiple consumers but we have to consider above mentioned issues in consumer load balancing.

How would you do fault-tolerance in EMS? Explain the complete process.
Ans: FT in EMS can be achieved by implementing pair of servers called primary and backup while the primary does the normal job of sending and receiving messages the back up server takes the place of primary if the primary fails. The pair shares the information from the shared state. When the primary goes down the backup server reads all the primary config files and starts from there. The primary locks the shared state if its active so that the backup server doesn’t take its place. the lock is released when the primary goes down so that the backup can lock the shared state. Only persistent messages can be implemented in this situation since non-persistent messages cannot be stored in external storage like shared state.

How a consumer can connect to the new primary EMS server when the running primary server goes down?
Ans: we can specify multiple URL’S for the client so that if the primary is down the next URL belonging to back up will be used.
In case of a primary having multiple address we can use multiple URL’S for the same server so that even the primary in one location is down it can connect to the primary of another location.
The URL’S are usually comma separated in client config.

How the clients of the primary server access the messages stored by primary server when it goes down and secondary server becomes primary server?
Ans: clients can be config to be intimated of the failover.
The backup reads the current state of the client from the shared storage
And then connects to the client if there are any undelivered persistent messages.

Scenario: Topic T1, Queue Q1 and Queue Q3 are bridged. A publisher published a message to Topic T1. But the publisher has no access rights to Q1. How the message will be traversed?
Ans: Message producers must have access to a destination in order to send messages to that destination. Messages can only be sent to bridged destinations to which the message producer has access.

Scenario: A publisher is publishing messages quickly than the consumers are consuming the messages. How to control this situation.
Ans: we can use flow control to address this situation. The target maximum size for pending messages is specified so that only that amount of message is stored and any messages above that will be blocked.
The server blocks the send call and releases only when the storage limit is below the set value.
The flow control is enabled only if the topic or queue has receivers.
This way the producers are slowed down. And the balance is achieved.

Can we set a limit for the total number of pending messages on Queue or Topic? What is the parameter for that
Ans: yes, max-bytes for pending messages.

What if max-bytes limit exceeds?
Ans: Messages that would exceed the limit will not be accepted into storage and an error is returned to the message producer.

What is the pre-fetch value?
Ans: In order for reducing the client’s waiting time in a server client scenario
For a queue based messaging only the prefetch value allows the the server to send messages in batches so that the message will be ready for the client when ever the client is ready. For automatic fetching its >1 and for disabling its “none”.

What is fail-safe?
Ans: The Tibco ems provides 2 modes for persistent topic/queue message storing to external device.
Normal: in this mode the messages stay in a buffer before writing to a storage(disk). So in case of any failure the messages may be lost.This mode is very efficient in situations were little loss of data is allowed.

Failsafe: in the fail safe mode the messages are first written to an external storage before sending so that no messages are lost ever. This is used when no loss of data can be encouraged.

How many ways we can determine the life span of the message in a queue. What are they?
Ans: Expiration parameter in queue configuration file.
JMS expiration time in queue sender.
The JMS expiration time in queue sender overrides any value given in config.

What are the basic configuration you would setup if you want to enable your EMS server for SSl communication
Ans: listen parameter and ssl_server_identity. Optionally private key.

What is the main config file in JMS?
Ans: The main configuration file controls the characteristics of the TIBCO Enterprise Message Service server. This file is usually named tibemsd.conf, but you can specify another file name when starting the server.
Exp para: server, password,flowcontrol,storage,server sartup…

Can you send messages from a server to another server?
TIBCO Enterprise Message Service servers can route messages to other servers.
• Topic messages can travel one hop or multiple hops(from the first server).
• Queue messages can travel only one hop to the home queue, and one hop from the home queue.
A server forwards topic messages along routes only when the global property is defined for the topic.
When a route becomes disconnected (for example, because of network problems), the forwarding server stores topic messages. When the route reconnects, the server forwards the stored messages.

What are multi-hop zone?
Ans: Multi-hop zone is a group of servers connected by routes.

How do you configure multi-hop zones?
By using routes
To create a route using the administration tool, first connect to one of the servers, then use the create route command with the following syntax:
create route url= zone_name= zone_type=1hop|mhop

Tell me about bridges. Why do we use them, Syntax to create bridges, use of message selector
Some applications require the same message to be sent to more than one destination possibly of different types.
So we use bridges.

What is the purpose for stores.conf
a. This file defines the locations either store files or a database, where the EMS server will store messages or
b. Each store configured is either a file-based or a database store.

How many modes are the messages written to store file.
2 modes.. sync or async. When absent , the default is async

What is tibemsd.conf
It is the main configuration file that controls the characteristics of the EMS server.

How many delivery modes for messages?
Persistent, Non-persistent, Reliable-delivery.

What is the maximum messagesize?
Ems supports max message size of 512 mb

Name 3 destination properties and explain them.
Global, secure, maxmsgs, maxbytes, flowcontrol, sender_name, sender_name_enforced, trace, maxRedelivery

"Log_Trace" writes information to the specified log file based on the trace options
logtrace will be written to log file.

Console Trace will be useful when you start your server in common window, and all logs will be displayed there, and ofcourse it written to log files also when you configure it.

What happens if the message expires/exceeded the value specified by maxredelivery property on queue?
If the jms_preserve_undelivered property is set to true, then it moves he message to undelivered message queue, if set to false, the message is deleted by the server.

What are the wild cards that we use in ems?how do they work for queues and topics?
We can subscribe to wildcard topics, but cant publish to them. Where as in case of queues we can’t either send /receive.

Are bridges transitive?

Tell me about flow control on destinations?
Some times the producer may send messages faster than the consumers can receive them. So, the message capacity on the server will be exhausted. So we use flow control. Flow control can be specified on destinations.

Tell me about flow control on bridges and routes?
Flow control has to be specified on both sides of bridges where as on routes it operates differently on sender side and receiver side.

Name 3 configuration files and tell me what it consists of?
a. Queues.conf
b. Topics.conf
c. Routes.conf
d. Factories.conf
e. Stores.conf
f. Groups.conf, users.conf, transports.conf

Name some administrative level destination properties?
a. View
b. Create
c. Delete
d. Modify
e. Purge

How can you change the configuration properties of EMS server?
You can change in the tibemsd.conf file or you can change using the ems admin console.

Tell me about multicasting in EMS?
a. Multicast is a messaging model that broadcasts messages to many consumers at once rather than sending messages individually to each consumer. EMS uses Pragmatic general multicast to broadcast messages published to multicast enabled topics.
b. Each multicast enabled topic is associated with a channel.

What are the advantages and disadvantages of multicasting..
a. Advantages: As the message broadcasts only once there by reducing the amount of bandwidth used in publish and
subscribe model. Reduces the network traffic.
b. Disadvantages: Offers only last-hop delivery. So can’t be used to send messages between servers.

On what destinations can you use multicast?

Suppose, you got an error while accessing a queue, that you don’t have necessary permissions to access the queue. What might be the solution/reason?
The user that is assigned to the queue and the user used while creating.

How does the secondary server know that the primary server is failed?
Based on heartbeat intervals

How do you add ems server to administrator?
Using domain utility

How do you remove individual messages from destinations?
Using purge command.

Connection and Session threading in Ems
Connection : Multi thread
Session : Single thread

Where do you use a bridge in real time?
we use in scenarios like publishing message from Topic to Queue, Store message in EMS for retrieval in case if there is any problem while moving data from one process to another.
When ever you are decided to use message selectors on BW, use bridges and use message selector on bridges, which is more powerful than using message selectors on BW.

Where is the AppManage located at?

3 files (batch) are ready for deployment. out of which only 2 files must be deployed together
and not deploy the other one. How can we do this using AppManage?
Batch means is it a single ear with multiple process archives, if so, dont pass the thrid process archive in the config file.

What are the steps to perform Server Side Load Balancing on the local machine?
1. Make a duplicate copy of the “cfgmgmt” Folder and rename it to “cfgmgmt2”
2. Make sure that the Server Name is same in the “tibemsd.conf” file in both the folders.
3. Change the port number in the second folder’s “tibemsd.conf” file (listen = tcp://xxxx)
4. Start both copies of the servers from the command prompt (ex: C:\ .. \ems\5.1\bin\tibemsd –config
5. “C:\ .. \cfgmgmt\ems\data\tibemsd.conf”)
6. In TIBCO Designer, modify the JMS Connection “Provide URL” to contain both the servers
( ex: tcp://localhost:7222 | tcp://localhost:7223)

What are the steps to setup Fault Tolerance servers on the local machine?
1. Make a duplicate copy of the “cfgmgmt” Folder and rename it to “cfgmgmt2”
2. Make sure that the “Server” Names and “Listen” ports are not the same in the “tibemsd.conf” file in both the folders.
3. Change the port number in the “tibemsd.conf” file (i.e ft_active = “listen port of the other server”) in both the
“cfgmgmt” folders.
4. Start both copies of the servers from the command prompt
(ex: C:\ .. \ems\5.1\bin\tibemsd –config “C:\ .. \cfgmgmt\ems\data\tibemsd.conf”)

What is the use of Bridges?
Some applications require the same message to be sent to more than one destination possibly of different types. So we use bridges

What is the syntax to create Bridges without Message Selector?
create bridge source=queue:bridgequeue target=topic:bridgetopic

What is the syntax to delete a bridge?
delete bridge source=queue:bridgequeue target=topic:bridgetopic

What is the syntax to create Bridges with Message Selector?
create bridge source=queue:bridgequeue target=topic:bridge topic selector="keyword"

What is the use of Bridges and Routes?
Both are used to channel messages from senders to receivers. Bridge act as connector between two different queue and Routes act as connector between different server for sending message and receiving acknowledgement of delivery.

What are the steps required to create a Route between two Servers?
1. Make a duplicate copy of the “cfgmgmt” Folder and rename it to “cfgmgmt2”
2. Make sure that the Server Name is NOT the same in the “tibemsd.conf” file in both the folders.
3. Change the port number in the second folder’s “tibemsd.conf” file (listen = tcp://xxxx)
4. Set the routing property to enabled in the “tibemsd.conf” files in both the folders open factories.conf under
“cfgmgmt2” and change the settings for GeneralConnectionFactory, QueueConnectionFactory and
TopicConnectionFactory URL to (tcp://xxxx)
5. Create Route on Server 1 (route “Server2-Name” url=tcp://localhost:xxxx)
6. Create global queue / topics on both servers as required
7. Start both copies of the servers from the command prompt (ex: C:\ .. \ems\5.1\bin\tibemsd –config
“C:\ .. \cfgmgmt\ems\data\tibemsd.conf”)
8. Test the route by using queue / topic in a BW Process

How to create a transport between RV and EMS?
Transport can be established between RV and EMS topic or queue.
The message can be imported as well as exported from RV.Important point to remember is, with Topic for transport the messages can be imported and exported from RV But in the case of Queues the message can only be imported from RV. Follow these steps to establish transport between RV and EMS :

1)For enabling the transport :
In the configuration file tibemsd.conf set the parameter tibrv_transports to enabled. The default value is disabled.
2)To set the type of parameters for tranport:
In the transports.conf file set the parmeters in Transport definitions (in the configuration file transports.conf) specify the communication protocol between EMS and the external system.

The parameters can be as follows:
type = tibrv
topic_import_dm = TIBEMS_RELIABLE
service = 7200
network =
daemon = tcp:host:7200

RV01 is the name of the transport.
type = required parameter which can be set to tibrv or rvcm(for certified messages)
service = UDP port.if absnt the default is 7200
network = IP address.
Daemon = TCP Port.
topic_import_dm = delivery mode for importing the messages and the values can be TIBEMS_RELIABLE,

Similarly the paramters can be set for topic_export_dm and queue_import_dm. export_headers = The default
value is true and can be set to false if there is no requirement of exporting the JMS headers.
export_properties = The default value is true and cane be set to false if there is no requirement of exporting the JMS properties.

3)Destination definitions (in the configuration files topics.conf and queues.conf) can set the import and export
properties to specify one or more transports.

Can set the import/export properties by either making an entry in topics.conf or queues.conf filesdirectly like
topic.sample import="RV" where topic.sample is the name of the topic.
or in the admin tool use :
addprop topic import="RV01,RV02" which will add property import to myTopics in topics.conf files

Key Points:
The transport takes place when the topic name and the RV subject name are same.

For topics:
When a topic specifies import on a connected transport, tibemsd imports messages only when the topic has registered subscribers.

For queues:
When a queue specifies import on a connected transport, tibemsd immediately begins importing messages to the queue, even when no receivers exist for the queue.

When a topic and a queue share the same name, at most one of them may set the import property.
For example, if a topic example.transport and a queue example.transport are both defined, only one may specify the import property.
TIBCO EMS Multicast - Features
TIBCO EMS is a distributed and reliable architecture, with support for load-balancing, routing, and fault tolerant configurations that together remove single points of failure.

By using TIBCO's messaging solution, companies have been able to reliably support over 50,000 messages per second and achieve 99.999% uptime.

A distributed message bus with multi-protocol support for Java Message Service (JMS), TIBCO Rendezvous®, and TIBCO SmartSockets. TIBCO supports many of the leading open standards, including web services, and provides adapters for third-party applications and infrastructure including IBM MQSeries. This makes it possible for companies to reuse their existing investments and focus on delivering new functionality Built-in monitoring and management capabilities that provide detailed administrative functions and statistics and support automation through an administrative API or command-line shell. Companies can also leverage TIBCO's common monitoring and management framework for top-down, end-to-end distributed monitoring and management of TIBCO and non-TIBCO products

Multicast – Features
Multicast is a messaging model that allows the EMS server to send messages to multiple consumers simultaneously by broadcasting them over an existing network.

Multicast is highly scalable
Multicast reduces the amount of bandwidth consumed
Multicast reduces the number of operations performed by the server
Multicast broadcasts the message only once where as in case of publish and subscriber for each of theconsumer a copy of the message is getting published

Multicast does not guarantee message delivery
Messages requiring a high degree of reliability should not use multicast
Multicast offers last-hop delivery only; it cannot be used to send messages between servers.
Multicast should not be used in applications where security is a priority

Fault-Tolerance setup-A(Which deals with configuration of the files for fault tolerance)
Note:The Ems data store should be in SAN or NAS,in actual Production that the datastore is accessible by both primary and back up server

SAN-Storage Area Network
NAS-Network Area storage
But for our case we would use just operating system file system (shared by both primary and Backup server)

Fault Tolerance configuration setup
Parameters will be in Bold and Inclined for easy identification

Configuring Primary server
open the c:\tibco\ems\bin\tibemsd.conf (This file is called Ems configuration file)

Server=EMS-SERVER-RAMU(This value is upto your choice)
Listen=tcp://7222(This value is upto uour choice)
Ft_active=tcp://7444(This value is upto your choice)

Configuring Backup server
Create a folder called Backup in that please copy all the *.conf files(only configuration files) from c:\tibco\ems\bin\ and place it in c:\tibco\ems\bin\Backup\

Note:From now we will work in the Backup Folder, open tibemsd.conf file in the folder

Server=EMS-SERVER-RAMU(This value must match the value of the server parameter in primary server's tibemsd.conf file)
Listen=tcp://7444(This value must match the value in Ft_active paramter in primary server's tibemsd.conf file)
Ft_active=tcp://7222(This value must match the value in Listen parameter in primary server's tibemsd.conf file)
store=c:\tibco\ems\bin\datastore(This value must match the value in store parameter in primary server's tibemsd.conf file,note that the value in primary server's tibemsd.conf file is just datastore)

Prepend this path to c:\tibco\ems\bin\Backup\ below list in the backup sever tibemsd.conf


If you observe the tibemsd.conf file in primary server and compare the tibemsd.conf file in Backup server
The values for some parameters in primary tibemsd.conf file is jfor example "users=users.conf" where as in backup server tibemsd.conf file we give "users=c:\tibco\ems\bin\Backup\users.conf".The reason why because while installing the Ems server ,it sets these values and it knows where to look for the path , so thats the reason why the full path is not mentioned for various parameters in tibemsd.conf for primary server

Fault-Tolerance Setup-B(which deals with starting primary and back up server--which will be in standby mode)
This post is continuation of Fault Tolerance Setup-A

Go to All programs>Run>type cmd
You will get a command prompt window
Type command: cd c:\tibco\ems\bin
Now you will be inside bin directory
Start Primary Server
Type command: tibemsd (This is a application )

Start Backup Server
Open another command prompt
Navigate to the directory by entering the below command
cd c:\tibco\ems\bin
Give the following command
tibemsd -config Backup\tibemsd.conf (This is not done in primary but you are doing in back up server , since Primary server tibemsd.conf file is in same directory as tibemsd application)
In the backup sever command prompt you can see that it is in standby mode for primary (tcp://7222)


javarevisited said...

Nice post dude. Its worth reading Difference between Tibco RV and Tibco EMS
because both of technology are in use in investment banking and commonly asked in interview.

TIBCO Interview Questions

Anonymous said...

Hey Arun,

Very enrichin post.

Could you also post something on SOAP or some other topics as well.


Anonymous said...

Hey excellent info...very much useful. Thanks for wonderful posts


Anonymous said...


Anonymous said...

What are the options for storing persistent queues . Can Oracle be used for this.

Anonymous said...

Many thanks - just what I needed to prepare for an interview!

TIBCO Guide said...

Very interesting and valuable post. I was refreshing my concepts about TIBCO EMS and this post has served the purpose rightly.

Anonymous said...


MRPR said...

Simple And Very Useful