Question: I am new to the world of Tibco... I have been asked to create an VB.net application to do couple of things:

1. Update the value of a column in a database (which then generates a message in TIBCO EMS).
2. My application then needs to read this message from TIBCO and determine if the message has a particular word in it, and display the result as Pass or Fail

I have already written the first piece of the task, however, I have no clue on how to proceed on the second one. I am hoping to get some kind of help/guidance on how to proceed! Any suggestions?

Thanks,
NewTibcoUser

Answer: 
This can be done easily depending on which Tibco Tools you own. If you have BW and ADB (Active Database Adapter) then you can use that. 

option 1:

---

If you don't have adb you can mimic it by doing something like the following (ADB isn't magical its pretty strait forward) 

1) Create a Mirror of the table that is being monitored for changes (You could just put in the column you want to monitor plus the key)
 Key
 ColumnYouWantToMonitor
 DeliveryStatus (Adb\_L\_DeliverStatus)
 Transaction type (adb\_opCode)
 Time It happened (Adb\_timestamp)
 Delivery Status (ADB\_L\_DeliveryStatus)
2) Create a trigger on the table That inserts a record into the table.

3) Write a .Net Process that monitors the table every 5 seconds or 10 or whatever (Make it configurable) (select \* from tableX where DeliveryStatus = 'N' order by transactionTime)

4) Place the message on the EMS Queue or do a service call to you .Net App. 

---

Option 2

1) Create a trigger on the table and write the event to a SQL Server Brokering Service Queue
2) Write a .Net app that reads from that SSBS queue and converts it into a EMS Message

some design considerations

* Try not to continually query (Aka poll) for changes on your main table (prevent blocking)
* If your app is not running and DB changes are happening ensure that you have a message expire time. So when your app starts it doesn't have to process 1000's of messages off the queue (Depending if you need the message or not)
* If you do need the messages you may want to set the Queue to be persistent to disk so you don't loose messages. Also Client acknowledgement in your .Net app would be a good idea not just auto ack.
*
As you mention, the first point is already done (Perhaps with ADB or a custom program reacting to the DB insert).

So, your problem is strictly the "React to content of an EMS message from VB.Net" part.

I see two possibilities :
1- If you have EMS, ADB and BW, make a custom Adapter subscriber (a BW config) to change the DB in some way in reaction to messages on the bus. Your VB application can then simply query the DB to get the response status.

2- If you don't have so many products from the TIBCO stack, then you should make a simple C# EMS client program (see examples provided within EMS docs). This client can then signal you VB application (some kind of .Net internal signaling maybe, I am not an expert myself) or write the response status in DB.