Beruflich Dokumente
Kultur Dokumente
RVCM provides complete reliability for the subscribers RVCM uses ledger
concept.
Two types of ledgers
1.
File based
2.
Process based
For process based ledger the publisher offers reliability only as long as he is
running
Process based means memory
For File based ledger the publisher offers reliability all the time.
For each out bound message a certified sequence number will be added,
message will be stored in the ledger file and then it will be placed on the
network.
When the subscribed subscriber receives the message he should send
conformation for the received message
The certified subscriber ledger file will be updated with incoming message
subject name, the certified publisher transport name, and the last
acknowledged message sequence number will be updated with conformed
message sequence number.
For each received message the certified subscriber should send conformation to
the publisher. When publishing RVD receives confirmation then only it
understands that message has been delivered successfully.
The certified publisher provides reliability only for agreed subscribers by default
when the certified subscriber receives the first message, that message will be
having same sequence number as "Zero" irrespective of actual sequence
number.
Same sequence number "0" indicates that the message is only reliable message
which means there is no guarantee for the message second there is no certified
delivery agreement has been established
After receiving the first message the certified subscriber internally will send
certified delivery request to the publishing RVD then the list of listeners in the
publisher ledger will be updated with agreed certified subscriber transport
name.
After the agreement only the sublisher will provide offline message delivery to
the agreed certified subscriber
When ever certified subscriber lost message by comparing last acknowledged
message sequence number with the incoming message sequence number.
For the lost message he will send retransmission request for the publishing RVD.
When the publishing receives retransmission request it will check the ledger
and if the agreement exist the message will be retransmitted
1.
2.
3.
In certified
Delivery
Delivery
Delivery
The relay agent should be running on only on the publisher system if the publisher
is offline and at that time if certified subscribers sends retransmission request the
relay agent will retransmit all the offline messages to the certified subscribers
If relay agent is configured the certified publisher need not to be active in order to
deliver offline messages
If at all the relay agent is configured we should make sure relay agent is online
RVR subscriber can also receive messages that are published by certified publisher
but offline message delivery will be only for certified subscribers but not for RVR
subscribers
If RVR subscriber sends retransmission request with in buffer interval or with in
reliability time then RVR subscriber can receive offline messages
Only if the network link is broken
RVCACHE contains the most recently exchanged message data for any subject.
It will store only one message per subject
In order to get message data from RVCACHE application should send request on to a
subject called "_SNAP.<SUBJECTNAME>"
In RV the load balancing is implemented by RVDQ
RVDQ means its collection of cooperative RV transport objects each having its own
process
The DQ will be implemented only at the subscribers side
All the applications that are part of distributed queue should be listening on the
same subject
In a distributed Queue only one application will be acting as scheduler and all other
applications will be acting as workers
The role of scheduler is delivering messages to the workers in load balanced
manner if all workers are busy then only the scheduler will process messages
All the DQ applications should have same values for
Cmq name
Scheduler activation
Scheduler heartbeat
Based on the requirement and systems configuration each worker can be configured
with same values or different values for
Scheduler weight
Worker weight
Worker task
Worker complete time
If all applications are having same values for these 4 parameters one of the
application will be picked randomly ac scheduler and this scheduler will deliver one
message to one worker at a time
Which ever allocation has highest scheduler weighr that application will be initial
scheduler. The worker weight specifies the prerority of the worker . Worker stasks
specifies number of messages a worker can process simultaneously
Worker complete time specifies the amount of time a worker requires to complete
given message processing.
Worker tasks is also referred as worker queue
When ever scheduler recives messages he will deliver all the messages to the high
prority owrker ans schedular will continioue to do so till the high prority worker
becomes busy
A worker will be treated as busy if he is worker queue is full or if he unable to
complete message processing with in specific amount of time.
When the high prority worker becomes busy then the schedular will delever
messages to the second high proroty worker
In this manner the schedular will distribute meesage amoung workers for load
balenced message processing
At reqular intervels wich is ssecified by schedular heart beat the schedilar will be
sending hard beat messages to all the workers indecating that he is active
If the schedular stops sending hear beadschedular weightw messages
The worker who has second highest schedular weight will beome or will be
activated as new schedular after the intervel which is specified by ______________
And the initial
s__________________________________________________________________________
Internelly all the dq appliccations are certified messaging applications the DQ is
implemented with the help of RF FT
RVFT --- RV fault tolerance
RVFT is responcible for _________________
Making sure that the DQ applicatiosn are communicating properly and it is also
responcible for activating working as schecular and deactivating schedular
The dq group should contain min 3 applications
For load balance functionality
CMQ-certified message queue
Using cmq name applications will be logically grouped under a named distributed
queue
All the DQ applications should have same business logic
If the publisher to DQ is certified publisher the DQ application should send
confirmation other wise the dont need to send confirmation
RVRD stands for RV Routing De_____
messages from multiple UDP interfaces, for this the system should have multicast
address
Multicast address range is 224.0.0.0 to 239.255.255.255
C:\Users\sundeep>RVD -listen 7575 - reliability 500 -http 7676 logfile C:\RVLOGG
ER.LOG
To test the network
rvperfm -messages 20000 -size 1500 -interval 5000 -batch 5000 -subject PERF
RVPERFS - SUBJECT PERF
For subscriber(slave )
EMS stands for Enterprise message service
EMS is based on JMS specification
JMS--- Java message service
EMS is based on TCP protocol
EMS follows Hub and spoke architecture
EMS supports 3 types of communication models
Synchronous
Asynchronous
Asynchronous with reply
EMS synchronos and asynchronous with reply are flexible than RV synchronos and
asynchronous with reply
EMS supposts 2 messing models
Point to point
Publish subscribe
EMS point to point is more flexible than RV point to point
RV publish subscribe is faster and flexible than EMS publish subscribe
Point to point messaging modal works under a domain called queue
Publish subscribe under a domain called TOPIC
In order to connect to a EMS server for point to point communication application
should specify new connection factory and for message exchange they should
specify the destination as QUEUE
For publish subscribe communication application should specify topic connection
factory for connecting to EMS server and they should specify topic for message
exchange
Select receiver 1
Go to queue receiver
Change the acknowledge mode to client
Run the sender and send one message
Lets set the property max redelivery
ADDPROP QUEUE POLICIES.QUEUE MAXREDELIVERY=10
Undelivered queue if queue has max-redelivery property when redelivery limit
exceeds the message will be deleted from source queue. If the sender specify a
JMS property called "JMS_TIBCO_PRESERVE_UNDELIVERED". Them
unacknowledged messages after max redeliver limit will be redirected to
undelivered queue.
Undelivered queue will contain unacknowledged messages and expired
messages for the destinations which has the properties max redelivery and the
undelivered queue is "$sys.undelivered "
To set the JMS_TIBCO_PRESERVE_UNDELIVERED at the sender
Get JMS application
Properties
Select sender go to advanced
Go to JMS application properties a
D specify the jms application properties
Select input
Specify "true" at jms tibco preserve undelivered
By default the message will be on the destination till EMS receives
acknoledgment from the receiver we can explicitly specify the life time of
message by using the property JMS Expiration
Select que sender---> input ---> jms expiration----> specify 60
Select receiver and change the acknowledge mode to auto
Create one jms connection------------> name-----> JMS_admin_conn
Get a process
Name---> DELIVERY_NACK_AND)EXPIRED_MSGS(ADMINTASK)
SPECIFY ONE jms RECEIVER AND ONE jms Que sender
Name-->101
Input
Request_id --> "REQ-101"
Body---> "REQ-101"
Copy past the sender
Change all the 101's to 202
Also create more 303,404 etc
Select 202
Create a group
Repeat un till true
h(Index)
$h >= 2(condition)
First run the sender
Run the message picker
PUBLIC subscribe
In public subscribe each message can be received by multiple subscribers thats
why the public subscribe offers one to many message delivery.
When ever publisher publish message to EMS server EMS server will deliver that
message to all active subscribers.
By default all the subscribers should be active in order to receive messages
while publisher is publishing messages other wise they can not receive
messages
Thats my the default topic subscribers are called non durable subscribers
A non durable subscriber is a subscriber who can receive messages only when
he is online
EMS server dose not provide offline messages for non durable subscribers
If a topic has only non durable subscribers EMS server dose not store pending
messages for that topic
A durable subscriber is a subscriber who can receive online messages and
offline messages
EMS server will hold the messages which were published during durable
subscriber absence and when ever durable subscriber becomes online EMS
server will deliver all the offline messages to the durable subscriber the EMS
server will store the messages on to the topic only if the topic has at least one
durable subscriber
There are two ways of creating Durable subscriber
1.
By EMS administrator
2.
Dynamically by applications
For EACH SUBSCRIBER THE EMS SERVER WILL MAKE COPY OF MESSAGE AND
WILL BE DELEVERED
But where as in the case of RV broadcasting irrespective of number of
subscribers the message will be traveled on the network only once.
Even though at messaging level the public subscribe of EMS provides one to
many message delivery internally the EMS server will treat each subscriber as a
point to point messaging
We are not suppose to make all the applications as durable subscribers
When ever a durable subscriber is created a mirror image for the actual
subscriber will be created even though the message will be received by actual
subscriber and send conformation still EMS server will store the messages.
The EMS administrator should carefully check and delete the messages from
durable subscribers
Fig
New project --- > ems.topics
JMS
JMS connection
Name: JMS_CONN_PUB
Go to advanced
PUB.TCF
One more JMS connection
Advanced topic--- SUB.TCF
Copy past JMS connection
That makes one publisher and two subscribers
Get a process
Name PUB
One more process
Name Sub1
Go to Publisher process
Get a JMS topic publisher
JMS connection select JMS Conn PUB
Topic select the topic---- policies.request.topic
Select Input in Body--- "vehicle policy"
Select sub one
JMS topic subscriber
Connection JMS connection sub1
Topic policies.request.topic
Copy past that process
vehicle policies_type='VEHICLE'
vehicle policies_type='VEHICLE'
Select Sub1
Topic subscriber
Go to advanced
Go to jms application properties and specify JMS application properties
Message selector---> policies_type='VEHICLE'
Select Sub2
Topic subscriber
Go to advanced
Go to jms application properties and specify JMS application properties
Message selector---> policies_type in =('HEALTH','PROPERTY')
Select publisher
Select topics publisher
Advanced
JMS application properties--- JMS application pro
Copy past the topic subscriber
Change the names to vehicle, health and properties
Select property input
Other properties---- policy type---- "PROPERTY'
Do mapper check and repair
Health
Policy type --- "HEALTH'
Do mapper check and repair
Select vehicle
Policy type --- "velicle"
Destination Bridge
Using destination bridging a message can be redirected to multiple destinations
which exist in the same server.
A bride can be created between topic to topic
Topic to queue
Que to toipc
And queue to queue
Bride direction should be uni directional only we are not suppose to create
bridge which results in bi-directional
The advantage of bridge is with out resending same message multiple times
and with out reconfiguring the applications messages can be delivered to or
redirected to multiple destinations
There are 2 ways of creating bridges
Bridge.config---------------[<TYPE OF DESTINATION>:<NAMEOF DESTINATION>]
<TYPE OF DESTINATION>=<NAMEOF DESTINATION>
2.
EMS ADMIN TOOL
a.
CREATE BRIDGE SOURCE=<TYPEOF DESTINATION>:<NAMEOF
DESTINATION>
Target=<TYPE OF DESTINATION>=<NAMEOF DESTINATION>
From ems admin tool we can bridge only one destination with another
destination but from bridges.configaration file we can bridge one destination
with one or more destinations
1.