locked
Database insertion using msmq RRS feed

  • Question

  • Hi all,

    i have requrirement where am consuming web service and developing application in biztalk here am using both sides two-way ports,

    now issuse is i want to store request and response messages in sql database,

    which is the better way to do this please give me suggetions.

    Thanks & Regards,

    Premsagar

    Monday, June 22, 2015 11:55 AM

Answers

  • i want to store this data in my own table in DB.

    This is what BizTalk Tracking is for exactly. https://msdn.microsoft.com/en-us/library/aa560149.aspx?f=255&MSPPError=-2147217396

    Storing the data outside the app without a specific requirement is almost always a bad idea since as it introduces compliance and operational problems that outweigh any benefit.

    It (the archive component) can be ok in DEV if you use a DEV specific Pipeline.

    • Marked as answer by Angie Xu Tuesday, June 30, 2015 5:20 AM
    Thursday, June 25, 2015 12:58 PM
    Moderator

All replies

  • Hi Prem ,

    The simple approach would be to define a static C# function and pass xml message as input parameter along with necessary context properties which you want to popoulate to sql server (like application name ,Orchestration instance id etc) .

    This approach is simple and for small application specific scenario. 

    Now if you really want to build a robust logging framework I would suggest to work on Azure event logging within your orchestration .

    I would suggest go with article which beautifully explains the process around this .

    http://geekswithblogs.net/michaelstephenson/archive/2014/01/23/155259.aspx

    Log4net & Azure Service Bus Event Hubs

    Thanks

    Abhishek

    Monday, June 22, 2015 12:21 PM
  • Have a look at the BizTalk Archiving component @codeplex [https://biztalkarchiving.codeplex.com/]. This component when used with pipelines will permit you to store data into database.

    Use this within your receive and send pipelines from MSMQ to meet your requirement.

    Regards.

    Monday, June 22, 2015 12:55 PM
  • First, can you explain a little about why you want to do this?  I say this as a warning since general 'archiving' tends to be more problematic then beneficial.

    The first option you should explore is BizTalk Tracking, it's already there and free, just configure it.

    Second, without knowing the exact business requirements, we really can't offer any good advice.  If the business is not asking for this, don't bother doing it.

    Monday, June 22, 2015 1:30 PM
    Moderator
  • hi jhon,

    Thanks for giving me replay,

    Here requirement is i want trance incoming and outgoing messages and store them in sql db table.

    i want to store this data in my own table in DB.

    Thanks&Regards,

    Premsagar

    Thursday, June 25, 2015 10:39 AM
  • i want to store this data in my own table in DB.

    This is what BizTalk Tracking is for exactly. https://msdn.microsoft.com/en-us/library/aa560149.aspx?f=255&MSPPError=-2147217396

    Storing the data outside the app without a specific requirement is almost always a bad idea since as it introduces compliance and operational problems that outweigh any benefit.

    It (the archive component) can be ok in DEV if you use a DEV specific Pipeline.

    • Marked as answer by Angie Xu Tuesday, June 30, 2015 5:20 AM
    Thursday, June 25, 2015 12:58 PM
    Moderator