-->

IBM Integration Bus (IBM Message Broker)

This site is under construction

Monday, August 15, 2016

IBM Intergration Bus(Websphere Message Broker) Questions

Q) How message broker transfers the messages?


 A) At input, nodes broker converts input message irrespective of format or data type into Bitstream because Broker understands only Bitstream format(0's, 1's) and at the output node again it converts into Bitstream.
 i) Input bitstream means representing the message in  0's, 1's which is nothing but Blob format because blob is a single string representation of the bitstream format.


Q) When do I need to use parser in message broker or how messages are propagated in message broker?

A) Broker converts all data formats of data into Bitstream at the input node. If we don't want to convert the format of the received message and don't want to do any changes to received message then no need for parsing that means we are just passing the message whatever the format we are reeving without any changes to input. In general, If the source and destination are required the same format and if the source doesn't need any manipulations then no need of using any parser simply pass messages using input and output nodes.

i)  The input message is in one format(ex: CSV) and destination wants in a different format(ex: XML)  then we need to use an appropriate parser to convert CSV to XML because at input node broker converts CSV to input bitstream so a user can not understand the bitstream format so parser converts the bitstream format to logic tree structure then into destination required format(XML).

ii) Even if source and Destination want the same format but we want to do some modifications to source message then we need to convert first from input bitstream into specified parser depends on source format than we can do changes to received message and pass to destination.

iii) At input nodes and output, nodes broker converts the messages into Bitstream format


Q) Why logical tree structure is needed? Where and who creates a logical tree structure in Message broker and what is the logical tree structure?

A)  Usually at input and output nodes broker converts all message into bitstream format internally which can be understood by the broker but if we want different data format at the destination to compare to source or even if source and destination require the same format but need some modifications to source message then we need to use an appropriate parser to convert into logical tree structure because bitstream can not understand to convert into a different format or to do some changes to received message then we need a parser to convert into logical tree structure then we can do whatever changes we want. So at the input node parser converts bitstream into the logical tree structure based on the parser and again at the output node parser converts logical tree structure into the bitstream. The logical tree structure consists of trees

    i)  Message tree structure

    ii) Environment tree structure

    iii) Local environment tree structure

    iv) Exception list tree structure

Reference:


 

Q) Difference between Environment tree and Local Environment tree?
 A)   Both are part of the logical tree structure
   ii) Local Environment has more predefined child elements (Variables, SOAP, Destination, write Destination, etc.) than Environment.
   ii) Local Environment depends on compute node properties example If you see in compute node properties there is a compute mode which has the local environment, message, local environment + Message, Exception + Local Environment and so on. So Local Environment is available at Compute node only and it won't propagate to other nodes which means it won't propagate throughout the thread. So these are called short time live variables.
   iii) Environment tree since it can propagate to upcoming nodes regardless of the compute mode property. If you want to create your own information, create it in the environment tree in a subtree called Variables. The environment tree differs from the local environment tree in that a single instance of it is maintained throughout the message flow. These are long live variables.
iv) The environment tree differs from the local environment tree in that a single instance of it is maintained throughout the message flow. If you include a Compute node, a Mapping node, or a JavaCompute node in your message flow, you do not have to specify whether you want the environment tree to be included in the output message. The environment tree is included automatically, and the entire contents of the input environment tree are retained in the output environment tree. Any changes that you make are available to subsequent nodes in the message flow, and to previous nodes.

Reference:

https://eaideveloper.wordpress.com/2014/02/09/environment-and-local-environment-trees-in-iib/


 


Q) What is ASBITSTREAM and when do we need to use ASBITSTREAM? 
A)  i) The ASBITSTREAM field function generates a bitstream for the subtree of a given field according to the rules of the parser that owns the field.

ii)  At input nodes broker converts the message into a bitstream and then into a logical tree structure by parser so in between the flows if we need any modifications to a particular part of the message then we cannot modify the logical structure message then we have to convert into Bitstream first. After converting the Logical tree message to the input bitstream you can convert the message whatever the data type you want.
iii) ASBITSTREAM returns a value of type BLOB that contains a bitstream representation of the field that is pointed to by Field Reference and its children.


Q) What is folder RootBitStream and FolderBitStream? What is the difference between these two?
A)  Both are part of ASBITSTREAM and ASBITSTREAM uses by default RootBitStream.
i) RootBitStream:
RootBitStream parse message tree(logical tree) into BitStream from the children of the target element in the normal way. That means RootBitStream converts elements after the target elements into BitStream but not include the target element.
Example:
SET abc = ASBITSTREAM (InputRoot.XMLNSC.*:Root.*:Child1 OPTIONS RootBitStream   CCSID 1208);
so element under the child1 only converted into BITSTREAM but not includes child1 also


ii) FolderBitStream:
  FolderBitStream parse message tree (logical tree) into BitStream
Built from the target element and its children. That means FolderBitStream converts the target element and its child elements into BitStream. It includes both target and child elements.
Example:
SET abc = ASBITSTREAM (InputRoot.XMLNSC.*:Root.*:Child1 OPTIONS RootBitStream   CCSID 1208);
So elements Root, child1 and elements under child1 converted into BITSTREAM. FolderBitStream includes both target and child elements

Reference:



Q) What is the Difference between the ODBC connection and JDBC connection?
A) ODBC is used to connect any kind of application to Database.
     JDBC is used to connect all java based applications to Database.

  ii) By using ODBC if we want to connect to Database first we need to connect to the local machine where the application is running and then the local machine is connected to Database.

iii) JDBC connects directly to the database with any local machine connection.



Q) What is the use of DECLARE statement in ESQL?

A) The purpose of the DECLARE statement is to define a variable, with datatype and also to initialize the variable with a value. initialization is optional in the DECLARE statement. 










No comments :

Post a Comment