Skip Headers
Oracle® Fusion Middleware User's Guide for Oracle B2B
11g Release 1 (11.1.1.6.1)

Part Number E10229-08
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
PDF · Mobi · ePub

E Sequence Message Management

This appendix discusses the ANT commands and Public APIs used by Oracle B2B for managing message sequencing.

The appendix contains the following sections:

E.1 Why Do You Need to Manage Sequenced Messages

Preserving the sequence of messages is important in the Oracle B2B message processing. This also needs robust management options. This includes the efficient reporting by using a dashboard and managing a particular target both within Oracle B2B as well as externally by other applications.

You need to have a good sequence message management framework for the following reasons:

E.2 ANT Commands and Public APIs

Oracle B2B provides ANT commandline utilities as well as public APIs to perform sequence message management.

This section lists the various management tasks that you can perform on sequenced messages.

List all the endpoints or targets with state:

This activity is like generating a dashboard of all the targets that explains all the states of the each target. This helps you to know the health of a target or endpoint (whether these are processing fine or these are in Error state).

ANT Command

ant -f ant-b2b-util.xml b2bsequencemanager -Dmode=listTargets

Public API

public java.util.List<java.lang.String> listSequenceTargets() throws java.lang.Exception

List pending sequence messages based on state and endpoint:

This activity is required to know the number of messages on a given target or endpoint with different states for the given target or endpoint. This information is useful to know how many messages are piled up for the given target, incase, if there is any issue with respect to the endpoint or target.

ANT Command

ant -f ant-b2b-util.xml b2bsequencemanager -Dmode=report -Dstate=PROCESSED -Dtarget=Pha01

Public API

public java.util.List<java.lang.String> getSequenceMessagesByTargetAndState(java.lang.String target, java.lang.String state) throws java.lang.Exception

List pending sequence messages based on state:

This retrieves all the messages for a given state pertaining to all the endpoints or targets.

ANT Command

ant -f ant-b2b-util.xml b2bsequencemanager -Dmode=report -Dstate=PROCESSED

Public API

public java.util.List<java.lang.String> getSequenceMessagesByTarget (java.lang.Stringtarget)throws java.lang.Exception

List pending sequence messages based on endpoint:

This lists all the pending messages with for a given endpoint or target.

ANT Command

ant -f ant-b2b-util.xml b2bsequencemanager -Dmode=report -Dtarget=Pha01

Public API

public java.util.List<java.lang.String> getSequenceMessagesByTarget (java.lang.String target) throws java.lang.Exception

Discard messages based on endpoint:

This deletes the messages based on a given target or endpoint. Essentially, this deletes all the message pertaining to a target or endpoint from the Sequence Manager table.

ANT Command

ant -f ant-b2b-util.xml b2bsequencemanager -Dmode=discard -Dtarget=Pha01

ant -f ant-b2b-util.xml b2bsequencemanager -Dmode=discard -Dtarget=Pha01 -Ddirection=OUTBOUND

Public API

public java.util.List<java.lang.String> discardSequencedMessageByTarget(java.lang.String target) throws java.lang.Exception

public java.util.List<java.lang.String> discardSequencedMessageByTarget(java.lang.String target, java.lang.String direction) throws java.lang.Exception

Discard messages based on state:

This deletes all the messages for a given state from all the endpoints or targets.

ANT Command

ant -f ant-b2b-util.xml b2bsequencemanager -Dmode=discard -Dstate=STACKED

Public API

public java.util.List<java.lang.String> discardSequencedMessageByState(java.lang.String state) throws java.lang.Exception

Discard messages based on state and endpoint:

This deletes all the messages for both a given state and endpoint or target.

ANT Command

ant -f ant-b2b-util.xml b2bsequencemanager -Dmode=discard -Dtarget=Pha01 -Dstate=PROCESSED

ant -f ant-b2b-util.xml b2bsequencemanager -Dmode=discard -Dtarget=Pha01 -Dstate=PROCESSED -Ddirection=OUTBOUND

Public API

public java.util.List<java.lang.String> discardSequencedMessageByStateAndTarget(java.lang.String target, java.lang.String state) throws java.lang.Exception

public java.util.List<java.lang.String> discardSequencedMessageByStateAndTarget(java.lang.String target, java.lang.String state, java.lang.String direction) throws java.lang.Exception

Discard messages based on message ID:

In case a particular message has some processing problems and should not be processed in the sequence manner. In this case, you can delete that message based on the message ID.

ANT Command

ant -f ant-b2b-util.xml b2bsequencemanager -Dmode=discard-Dmsgid=0AE851ED131B3D6103A00000152F97E9

Public API

public java.util.List<java.lang.String> discardSequencedMessageByMessageId(java.lang.String msgId) throws java.lang.Exception

Discard the first message of the endpoint:

This is a useful option to delete the first message of the endpoint or target. This may be required where the message is in stacked state and is not been able to be processed. Because this would be the first record in the stack, by deleting this, all the other messages can be processed successfully

ANT Command

ant -f ant-b2b-util.xml b2bsequencemanager -Dmode=discardFirst -Dtarget=Pha01

ant -f ant-b2b-util.xml b2bsequencemanager -Dmode=discardFirst -Dtarget=Pha01 -Ddirection=OUTBOUND

Public API

public java.util.List<java.lang.String> discardFirstSequenceMessageByTarget(java.lang.String target) throws java.lang.Exception

public java.util.List<java.lang.String> discardFirstSequenceMessageByTarget(java.lang.String target, java.lang.String direction) throws java.lang.Exception

Re-process the messages based on message id (with and without payload)

Re-processing of the message is a useful option. Assume that due to some problem, a particular target or endpoint is down. After the target or endpoint starts functioning normally, the re-processing of the message enables you to send the message to the target or endpoint in sequence.

Public API

public boolean processSequenceMessageByMessageId(java.lang.String messageId) throws java.lang.Exception

Pause / resume endpoint:

There may be a scenario, where the sequence messages need to be paused from processing. If the receiving application is down, then these messages can be paused till the application starts functioning. The pausing of messages is based on the given endpoint or target.

ANT Command

ant -f ant-b2b-util.xml b2bsequencemanager -Dmode=pause -Dtarget=Pha01

ant -f ant-b2b-util.xml b2bsequencemanager -Dmode=pause -Dtarget=Pha01 -Ddirection=OUTBOUND

ant -f ant-b2b-util.xml b2bsequencemanager -Dmode=resume -Dtarget=Pha01

ant -f ant-b2b-util.xml b2bsequencemanager -Dmode=resume -Dtarget=Pha01 -Ddirection=OUTBOUND

Public API

public boolean pauseSequenceTarget(java.lang.String target)throws java.lang.Exception

public boolean pauseSequenceTarget(java.lang.String target, java.lang.String direction) throws java.lang.Exception

public boolean resumeSequenceTarget(java.lang.String target) throws java.lang.Exception

public boolean resumeSequenceTarget(java.lang.String target, java.lang.String direction)throws java.lang.Exception

Get the state for given Target / endpoint:

This retrieves the state of a given target or endpoint.

Public API

public String getStateByTarget(java.lang.String target)throws java.lang.Exception

public String getStateByTarget(java.lang.String target, java.lang.String direction)throws java.lang.Exception