I am experimenting with the Outbox functionality and have a few questions where my findings don't fully match the what the developer guide states on the Particular website. I have been working with both the RabbitMQ and SqlServer transports.
My test code simply sends a message, inserts a row into a SQL table and then throws an exception. The retry then occurs and doesn't throw an exception. The behaviour I expect is that only 1 row should be inserted into my SQL table and the message should only be sent once.
On
http://docs.particular.net/nservicebus/outbox/ it states the following caveats...
- Both the business data and deduplication data need to share the same database.
- The Outbox is bypassed when a message is sent outside of an NServiceBus message handler. This is because there is no mechanism for repeated dispatching of the Outbox messages other than the standard retry logic, which won't be triggered in this case.
In regards to 1.), I have my 'business data' and deduplication data in two different databases and I still get the behaviour I expect. Is my test code incorrect? Or is this caveat inaccurate?
In regards to 2.), what are examples of messages being sent outside of an NServiceBus message handler?
On the same webpage as the link above it also states: -
- To keep track of duplicate messages, the NHibernate implementation of Outbox requires the creation of two additional tables in the database: OutboxRecord and OutboxOperation.
In my tests, OutboxRecord has been created but I haven't seen OutboxOperation. Any ideas why the second table is not being created? Everything still seems to work as expected.
Finally, are there any distinct advantages of using either the SQL Server or RabbitMQ transport when it comes to the Outbox functionality or do they offer exactly the same guarantees?