BizTalk Server General - Suspended messages?

This is Interesting: Free IT Magazines  
Home > Archive > BizTalk Server General > February 2005 > Suspended messages?





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Suspended messages?
Tareq Mohamed

2005-01-31, 2:54 am

In Content Based routing,
If BizTalk Port recieves a message and the "subscriber" port has not been
enabled yet, the message marked as susbended.
and the receive Pipleline marked as termiated, when I enable the
"Subscriber" port, why doesn't it subscribe to the messages. what can I do to
enable it to subcribe to the susbended messages.

Second question, If I post a XML message which contains mistake for example
"open tag" which is not close, this was done by mistake, how can I track such
messages and how to hanlde them.
Hugo Rodger-Brown

2005-01-31, 2:54 am

Tareq - the subscription required for the message to be processed is created
when the port is enlisted. When the receive location picks up the message,
it is delivered to the messagebox, where the message agent runs through the
subscription table to see if there are any services subscribing to the
message. If not, it is marked as suspended (unresumable). If there is a
subscriber, but it is stopped, then the messages is suspended (resumable.)
Restart the send port, and the message should clear.

If the send port was not enlisted, then there will have been no available
subscriber for the message when it arrived, so BizTalk cannot process it. It
is actually quite logical to suspend these messages and terminate the
pipeline, as the alternative would require BizTalk to save every single
message it ever received, on the premise that someone might at some point
want to subscribe to it. It's a bit like TiVo - you can pause live tv, but
you can't go back to a show that was on last week if you didn't record it!

I've posted some links to others' articles on subscriptions here:
http://hugorodgerbrown.blogspot.com...scriptions.html

Hugo

"Tareq Mohamed" <TareqMohamed@discussions.microsoft.com> wrote in message
news:7F572E17-E745-4722-A523-F0863A4EE4D1@microsoft.com...
> In Content Based routing,
> If BizTalk Port recieves a message and the "subscriber" port has not been
> enabled yet, the message marked as susbended.
> and the receive Pipleline marked as termiated, when I enable the
> "Subscriber" port, why doesn't it subscribe to the messages. what can I do

to
> enable it to subcribe to the susbended messages.
>
> Second question, If I post a XML message which contains mistake for

example
> "open tag" which is not close, this was done by mistake, how can I track

such
> messages and how to hanlde them.



Tareq Mohamed

2005-01-31, 5:53 pm

Great post Hugo,
but, I tried to post a xml documents that is not valid "Tag is opened and
never closed" biztalk consumed it, I want to track such messages, so how ?

"Hugo Rodger-Brown" wrote:

> Tareq - the subscription required for the message to be processed is created
> when the port is enlisted. When the receive location picks up the message,
> it is delivered to the messagebox, where the message agent runs through the
> subscription table to see if there are any services subscribing to the
> message. If not, it is marked as suspended (unresumable). If there is a
> subscriber, but it is stopped, then the messages is suspended (resumable.)
> Restart the send port, and the message should clear.
>
> If the send port was not enlisted, then there will have been no available
> subscriber for the message when it arrived, so BizTalk cannot process it. It
> is actually quite logical to suspend these messages and terminate the
> pipeline, as the alternative would require BizTalk to save every single
> message it ever received, on the premise that someone might at some point
> want to subscribe to it. It's a bit like TiVo - you can pause live tv, but
> you can't go back to a show that was on last week if you didn't record it!
>
> I've posted some links to others' articles on subscriptions here:
> http://hugorodgerbrown.blogspot.com...scriptions.html
>
> Hugo
>
> "Tareq Mohamed" <TareqMohamed@discussions.microsoft.com> wrote in message
> news:7F572E17-E745-4722-A523-F0863A4EE4D1@microsoft.com...
> to
> example
> such
>
>
>

Hugo Rodger-Brown

2005-02-01, 7:50 am

If your receive location is using an XmlReceive pipeline, then malformed Xml
documents will be suspended, as the XmlDissasembler will throw an exception
whilst attempting to parse the document. All suspended documents can be
viewed in HAT - look under Operations > Service Instances, selecting Class
== "Messaging", and you should see it. You can use the context-menu option
"Save Tracked Message" to save a copy of the message to disk, where you can
view the contents.

In this case the message never reaches the messagebox, so subscriptions are
never matched. (The message agent only processes messages that are received
into the message box.) If you use the PassThru pipeline in your receive
location, the message will reach the message box regardless, as the xml is
not being parsed. However, no message properties will be promoted if you use
the PassThru pipeline, so CBR cannot be based on message content.

If you do use a PassThru receive pipeline, and have your send port enlisted
and routing messages based on non-content criteria (e.g. receive port name),
then the message will be routed to the send port regardless of the validity
of the xml. However - if the send port uses the XmlSend pipeline, the
message will now fail in the send port, because of the same issue. It will
again be visible in HAT, and the contents of it can be viewed by
right-clicking on the messaging service in HAT, and selecting "Save All
Tracked Messages".

So - if the xml is invalid, it will always fail in an XmlReceive or XmlSend
pipeline, which means CBR cannot use message properties, as properties are
promoted into the message context in the XmlReceive pipeline.
However - if you use a PassThru pipeline at both ends, and route messages
using non-message-based filters, then you can put anything you like
through - an image, word document, whatever.

Hope this helps?

"Tareq Mohamed" <TareqMohamed@discussions.microsoft.com> wrote in message
news:4314E81A-134B-4851-8FA6-CAC6AE034AE3@microsoft.com...[vbcol=seagreen]
> Great post Hugo,
> but, I tried to post a xml documents that is not valid "Tag is opened and
> never closed" biztalk consumed it, I want to track such messages, so how ?
>
> "Hugo Rodger-Brown" wrote:
>
created[vbcol=seagreen]
message,[vbcol=seagreen]
the[vbcol=seagreen]
(resumable.)[vbcol=seagreen]
available[vbcol=seagreen]
it. It[vbcol=seagreen]
point[vbcol=seagreen]
but[vbcol=seagreen]
it![vbcol=seagreen]
message[vbcol=seagreen]
been[vbcol=seagreen]
I do[vbcol=seagreen]
track[vbcol=seagreen]


Tareq Mohamed

2005-02-01, 7:50 am

Great post Hugo,
Thank you...
Anther Question,
In real world senarios, what do u do with those messages, malformed xml
documents, etc.


"Hugo Rodger-Brown" wrote:

> If your receive location is using an XmlReceive pipeline, then malformed Xml
> documents will be suspended, as the XmlDissasembler will throw an exception
> whilst attempting to parse the document. All suspended documents can be
> viewed in HAT - look under Operations > Service Instances, selecting Class
> == "Messaging", and you should see it. You can use the context-menu option
> "Save Tracked Message" to save a copy of the message to disk, where you can
> view the contents.
>
> In this case the message never reaches the messagebox, so subscriptions are
> never matched. (The message agent only processes messages that are received
> into the message box.) If you use the PassThru pipeline in your receive
> location, the message will reach the message box regardless, as the xml is
> not being parsed. However, no message properties will be promoted if you use
> the PassThru pipeline, so CBR cannot be based on message content.
>
> If you do use a PassThru receive pipeline, and have your send port enlisted
> and routing messages based on non-content criteria (e.g. receive port name),
> then the message will be routed to the send port regardless of the validity
> of the xml. However - if the send port uses the XmlSend pipeline, the
> message will now fail in the send port, because of the same issue. It will
> again be visible in HAT, and the contents of it can be viewed by
> right-clicking on the messaging service in HAT, and selecting "Save All
> Tracked Messages".
>
> So - if the xml is invalid, it will always fail in an XmlReceive or XmlSend
> pipeline, which means CBR cannot use message properties, as properties are
> promoted into the message context in the XmlReceive pipeline.
> However - if you use a PassThru pipeline at both ends, and route messages
> using non-message-based filters, then you can put anything you like
> through - an image, word document, whatever.
>
> Hope this helps?
>
> "Tareq Mohamed" <TareqMohamed@discussions.microsoft.com> wrote in message
> news:4314E81A-134B-4851-8FA6-CAC6AE034AE3@microsoft.com...
> created
> message,
> the
> (resumable.)
> available
> it. It
> point
> but
> it!
> message
> been
> I do
> track
>
>
>

Hugo Rodger-Brown

2005-02-01, 7:50 am

Good question, and one whose answer really depends on the specific nature of
the application. If the number of poor messages is low, then manual
intervention via HAT may be acceptable. If not, then something more robust
is called for. The WMI object model exposes an event that fires whenever a
message is suspended, so you should be able to plug in to this. Check out
Martijn's suspended queue listener for a concrete implementation of this.
(http://martijnh.blogspot.com/2004/0...queue-listener.
html)

Of course, assuming the messages are generated by a program that understands
xml, this particular exception should never occur, as it ought to be
impossible to produce invalid xml? You really need to think through the
practical implementation of your application - we all make mistakes when
hand-rolling test data, and there's little point worrying about these, so
long as you have confidence in the final product? (I'm assuming that in
production your message are not produced by hand by someone using notepad!)

Hugo

"Tareq Mohamed" <TareqMohamed@discussions.microsoft.com> wrote in message
news:4507F934-F9CB-4F0A-8DE4-C8E418FF0EA4@microsoft.com...[vbcol=seagreen]
> Great post Hugo,
> Thank you...
> Anther Question,
> In real world senarios, what do u do with those messages, malformed xml
> documents, etc.
>
>
> "Hugo Rodger-Brown" wrote:
>
Xml[vbcol=seagreen]
exception[vbcol=seagreen]
Class[vbcol=seagreen]
option[vbcol=seagreen]
can[vbcol=seagreen]
are[vbcol=seagreen]
ved[vbcol=seagreen]
is[vbcol=seagreen]
use[vbcol=seagreen]
enlisted[vbcol=seagreen]
name),[vbcol=seagreen]
validity[vbcol=seagreen]
will[vbcol=seagreen]
XmlSend[vbcol=seagreen]
are[vbcol=seagreen]
messages[vbcol=seagreen]
message[vbcol=seagreen]
and[vbcol=seagreen]
how ?[vbcol=seagreen]
through[vbcol=seagreen]
the[vbcol=seagreen]
is a[vbcol=seagreen]
process[vbcol=seagreen]
the[vbcol=seagreen]
single[vbcol=seagreen]
tv,[vbcol=seagreen]
record[vbcol=seagreen]
http://hugorodgerbrown.blogspot.com...scriptions.html[vbcol=seagreen]
not[vbcol=seagreen]
can[vbcol=seagreen]
for[vbcol=seagreen]


Tareq Mohamed

2005-02-01, 7:50 am

Great Hugo,
really helpful information, and your blog look really good,
keep on that good work

"Hugo Rodger-Brown" wrote:

> Good question, and one whose answer really depends on the specific nature of
> the application. If the number of poor messages is low, then manual
> intervention via HAT may be acceptable. If not, then something more robust
> is called for. The WMI object model exposes an event that fires whenever a
> message is suspended, so you should be able to plug in to this. Check out
> Martijn's suspended queue listener for a concrete implementation of this.
> (http://martijnh.blogspot.com/2004/0...queue-listener.
> html)
>
> Of course, assuming the messages are generated by a program that understands
> xml, this particular exception should never occur, as it ought to be
> impossible to produce invalid xml? You really need to think through the
> practical implementation of your application - we all make mistakes when
> hand-rolling test data, and there's little point worrying about these, so
> long as you have confidence in the final product? (I'm assuming that in
> production your message are not produced by hand by someone using notepad!)
>
> Hugo
>
> "Tareq Mohamed" <TareqMohamed@discussions.microsoft.com> wrote in message
> news:4507F934-F9CB-4F0A-8DE4-C8E418FF0EA4@microsoft.com...
> Xml
> exception
> Class
> option
> can
> are
> ved
> is
> use
> enlisted
> name),
> validity
> will
> XmlSend
> are
> messages
> message
> and
> how ?
> through
> the
> is a
> process
> the
> single
> tv,
> record
> http://hugorodgerbrown.blogspot.com...scriptions.html
> not
> can
> for
>
>
>

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com