This project is read-only.

Subscriptions Manager

Topics: Developer Forum
Aug 23, 2008 at 12:20 PM
Hi MINAS,

I want to configure the ESB.NET to handle events subscribions and publishing.

Scenario  :

  1. Client sends request to subscribe for an event, or requesting the LOB system to notify him for an event
  2. ESB receives the request and invokes the service handler
  3. LOB system will process the request and sends back the response
  4. ESB registers the client for the requested events
  5. ESB forwards the reponse to the client
  6. client receives the response
  7. LOB system captures events and send them to ESB
  8. ESB forwards events to subscribers

So, how we can do this using ESB.NET ?  could you please help me.

Thank you

Aug 23, 2008 at 2:26 PM

Hi Jaafara,

ESB.NET only supports Static subscriptions out of the box.

Dynamic subscriptions are not currently supported.

Static subscriptions are configured in the ServicePipeline.config file.

(C:\ESB\Dev\Source\ESB\Base\Solutions\Main\Configuration\XMLConfigFiles\ServicePipeline.config)

If you have a lot of Pub/Subs, you may want to look at setting up a dedicated Pub/Sub instance to handle this. You can setup a routing/forwarding entries to forward all requests from other instances to this instance (as well as processing other requests or even the events to be published ...). Depends upon how you would like to set it up.

 

The example config below shows how to setup a subscription to a request with a context of:

OptionalEventOrSubscriptionName_ie_Queue.TopicName

and a Message Type of:

BuildCmd2::urn:schemas-biztalk-org:biztalk:BuildCmd2:BuildCmd2

(Root Element = BuildCmd2, Schema name = urn:schemas-biztalk-org:biztalk:BuildCmd2:BuildCmd2).

The example config below shows how to setup a static subscription with 3 subscribers.

The first 2 subscribers are actually other ESB.NET instances, so they're just forwarding handlers.

The 3rd subscriber is an ESB.NET handler that does whatever is necessary to talk to another subscriber.

You can also just publish to an MSMQ queue (not shown in the example), or publish to ESB.NET using the other supported transports.

The last setting -PMAsyncResponseSetting- also shows how to have a response sent to the sender (From Address), to the ToAddress, any other specific address

or a combination of all 3.

The FromAddress is interesting, as it allows a client to (for a particular subscription and request) specify the destination

address of the notification of processing completed to be sent to.

HTH

Cheers

Minas

 

 

<!--

 

Start Pub-Sub sample -->

 

<

 

PipelineMapSection>

 

<

 

PipelineEntry>

 

<

 

ResolveNameEntry>

 

<!--

 

Start Specific Subscription (Subscriber 1) Settings -->

 

<

 

ContextEntry>

 

<!--

 

Mapping of Parameters from Request Message ==> [System Type][System Version].[Context].[Service Name][Service Version]) -->

 

<

 

Context>OptionalEventOrSubscriptionName_ie_Queue.TopicName</Context>

 

<!--

 

First Document in Message: [Root Element Name]::[Schema Namespace] -->

 

<

 

ResolveName>BuildCmd2::urn:schemas-biztalk-org:biztalk:BuildCmd2:BuildCmd2</ResolveName>

 

<

 

PipelineID>1</PipelineID>

 

<

 

ProcessInParallel>0</ProcessInParallel>

 

<

 

ResponseIsRequestForNextPipelineItem>1</ResponseIsRequestForNextPipelineItem>

 

<

 

MultiLevelOverrides>

 

<

 

Custom>

 

<

 

ParamName>OverrideDestinationServerURL</ParamName>

 

<!--

 

Client Url Goes here -->

 

<

 

ParamValue>http://localhost/ESB/ESB_URL1/CoreInternetTransportAdaptors/Wcf/ESBSoapXmlDocTransport.svc/Default</ParamValue>

 

</

 

Custom>

 

</

 

MultiLevelOverrides>

 

</

 

ContextEntry>

 

<!--

 

End Specific Subscription (Subscriber 1) Settings -->

 

<!--

 

Start Specific Subscription (Subscriber 2) Settings -->

 

<

 

ContextEntry>

 

<

 

Context>OptionalEventOrSubscriptionName_ie_Queue.TopicName</Context>

 

<

 

ResolveName>BuildCmd2::urn:schemas-biztalk-org:biztalk:BuildCmd2:BuildCmd2</ResolveName>

 

<

 

PipelineID>2</PipelineID>

 

<

 

ProcessInParallel>0</ProcessInParallel>

 

<

 

ResponseIsRequestForNextPipelineItem>1</ResponseIsRequestForNextPipelineItem>

 

<

 

MultiLevelOverrides>

 

<

 

Custom>

 

<

 

ParamName>OverrideDestinationServerURL</ParamName>

 

<!--

 

Client Url Goes here -->

 

<

 

ParamValue>http://localhost/ESB/ESB_URL2/CoreInternetTransportAdaptors/Wcf/ESBSoapXmlDocTransport.svc/Default</ParamValue>

 

</

 

Custom>

 

</

 

MultiLevelOverrides>

 

</

 

ContextEntry>

 

<!--

 

End Specific Subscription (Subscriber 2) Settings -->

 

 

<!--

 

Start Specific Subscription (Subscriber 3) Settings -->

 

<

 

ContextEntry>

 

<

 

Context>OptionalEventOrSubscriptionName_ie_Queue.TopicName</Context>

 

<

 

ResolveName>BuildCmd2::urn:schemas-biztalk-org:biztalk:BuildCmd2:BuildCmd2</ResolveName>

 

<

 

PipelineID>3</PipelineID>

 

<

 

ProcessInParallel>0</ProcessInParallel>

 

<

 

ResponseIsRequestForNextPipelineItem>1</ResponseIsRequestForNextPipelineItem>

 

<

 

MultiLevelOverrides>

 

<

 

TransactionComponent>au.com.keystroke.services.activity.esbTest.Service1</TransactionComponent>

 

<

 

ComponentServer suffix="yes">LobSystems\ns\au.com.keystroke.services.activity.esbTest\bin\au.com.keystroke.services.activity.esbTest.dll</ComponentServer>

 

</

 

MultiLevelOverrides>

 

</

 

ContextEntry>

 

<!--

 

End Specific Subscription (Subscriber 3) Settings -->

 

 

</

 

ResolveNameEntry>

 

</

 

PipelineEntry>

 

<

 

MultiLevelOverrides>

 

<!--

 

Start General Subscription Settings (for this particular event/publication) -->

 

<

 

RequestQ/>

 

<

 

TransactionComponent>ESB.Core.Adaptors.Transport.RequestHandlerProxy.Sender</TransactionComponent>

 

<

 

ComponentServer suffix="yes">Base\Solutions\Main\TransportAdaptors\ESB.Core.Adaptors.Transport.Internet.Receive.WSE3\bin\ESB.Core.Adaptors.Transport.RequestHandlerProxy.dll</ComponentServer>

 

<!--

 

'PMAsyncResponseSetting:

 

'-1 = Sends no confirmation

'blank, or 1 = sends a response to the From Address of the original request (Should be the Default setting in config file...)

'2 = sends the response to the ToAddress

'4 = sends the response to the PMAsyncResponseURL (as specified below)

'Add the numbers up (bitmask) to send to combinations...

 

 

 

-->

<

 

PMAsyncConfirmation>

 

<

 

PMAsyncResponseSetting>1</PMAsyncResponseSetting>

 

<

 

PMAsyncResponseAddress>

 

<

 

PMAsyncResponseURL/>

 

<

 

PMAsyncResponseTransportType/>

 

</

 

PMAsyncResponseAddress>

 

</

 

PMAsyncConfirmation>

 

<!--

 

End General Subscription Settings (for this particular event/publication) -->

 

</

 

MultiLevelOverrides>

 

</

 

PipelineMapSection>

 

<!--

 

End Pub-Sub sample -->