nservicebus

NullReferenceException when initializing NServiceBus within web application Application_Start method

I am running the 2.0 RTM of NServiceBus and am getting a NullReferenceException when my MessageModule binds the CurrentSessionContext to my NHibernate sessionfactory. From within my Application_Start, I call the following method: public static void WithWeb(IUnityContainer container) { log4net.Config.XmlConfigurator.Configure(); ...

Very simple Error handling with NServiceBus

hey guys, here's a simple scenario NServiceBus Client/Server setup. The "Message" is a custom Class I wrote. The Client sends a request message. The Server receives the message, and the server does this: Bus.Reply(new UserDataResponseMessage { ID = Guid.NewGuid(), Response = users }); Then nothing. The Client never receives a resp...

NServicebus DNS Entry for Machine location

Hi Guys, I am trying to use a DNS entry for my NServicebus queue endpoint but no messages are being sent. It works fine when I enter the computer name or an IPAddress. I can ping the record and it resolves correctly so i'm wondering if it is possible to use a DNS record? Here is my config: <MessageEndpointMappings> <!--These are the ...

NServiceBus - Message Sent to and Removed from Queue, but Never Fire IHandleMessages.Handle

First let me state, today is my first day using NSesrviceBus - so I hope my question isn't too elementary. I have managed to set up Sender, Receiver, and Messages projects. When I debug the Sender, I see the messages show up in the configured queue. When I debug the Receiver, the messages are removed from the queue. However, my IHandleM...

nServiceBus with large XML messages

Hello, I have read about the true messaging and that instead of sending payload on the bus, it sends an identifier. In our case, we have a lot of legacy apps/services and those were designed to receive the payload of messages (xml) that is close to 4MB (close MSMQ limit). Is there a way for nService bus to handle large payload and persis...

Command Query Separation validating for retries

So I'm comfortable with the basic concept of CQS, where you might have a command that writes to one database, and that updates the query database that you read from. However, consider the scenario where you are entering data, and want to prevent duplicates. Using new employee data entry an employee register as an example, working throu...

nservicebus deleting subscription record after inserting it?

I have been playing with nservicebus for a few weeks now and since everything was going well on my local machine I decided to try to set up a test environment and work on deployment. I am using the generic host that comes with nservicebus and was using the nservicebus.Integration profile when running locally, but would like to use Nservi...

How to work with NServiceBus in gateway mode

I've been trying to get the pubsub sample in the NServiceBus download to work in a gateway mode. I haven't really been able to find out much detail at all about how to get NServiceBus to run in gateway mode. How do I setup the publisher/server in gateway mode? When I did try I received an access denied exception which would either be d...

NServiceBus with SQL Server Message Transport

Hi, Is there any way to use SQL Server as physical message transport instead of using built in MSMQ message transport with NServiceBus ? Thanks ...

"No message serializer has been configured" error when starting NServiceBus endpoint

My GenericHost hosted service is failing to start with the following message: 2010-05-07 09:13:47,406 [1] FATAL NServiceBus.Host.Internal.GenericHost [(null)] <(null)> - System.InvalidOperationException: No message serializer has been con figured. at NServiceBus.Unicast.Transport.Msmq.MsmqTransport.CheckConfiguration() in d:\BuildAge...

how to send email when maxretries reached in nservicebus MSMQ

Hi, I have a .net service that processes messages. For any failures, i use log4net and write to a file. I added an SMTP appender for this. The issue is that I only want to send one email when something goes wrong. The MaxRetries in my app.config is set to 5 and this is correct, 5 errors are logged in the log4net file but 5 emails are al...

WCF + NserviceBus Names notation

Hi. I trying to create WCF via NserviceBus. Create contract: [ServiceContract] public interface INotifyBusService { [OperationContract(Action = "http://tempuri.org/IWcfServiceOf_RequestMessage_ResultType/Process", ReplyAction = "http://tempuri.org/IWcfServiceOf_RequestMessage_ResultType/ProcessResponse")] ResultType Notify(Requ...

Nservicebus serization issue of derived types

Hi Guys, for the context setting, I am exchanging messages between my nServiceBus client and nSerivceBus server. its is the namespace xyz.Messages and and a class, Message : IMessage I have more messages that are in the other dlls, like xyz.Messages.Domain1, xyz.Messages.Domain2, xyz.Messages.Domain3. and messages that derive form tha...

NServiceBus Specify BinarySerializer for certain message types but not for all

Does NServiceBus 2.0 allow for defining serializer for given message type? I want for all but one of my messaages to be serialized using XmlSerializer. The remaining one should be serialized using BinarySerializer. Is it possible with NServiceBus 2.0? ...

NServiceBus specify order of Handlers execution

Just wondering if this is the way to specify the order to run a handler (AuthorizationHandler) before all others? public void SpecifyOrder(Order order) { order.Specify(First<AuthorizationHandler>.Then<IHandleMessages<IMessage>>()); } It just feels odd to add Then<IHandleMessages<IMessage>>(). Is there a nicer way of saying to the...

NServiceBus - How to configure bus to allow WindowsIdentity to flow from client

On the client I have setup the bus with ImpersonateSender(true) My server is configured AsA_Server, which by default should have ImpersonateSender(true) I'm now trying to retrieve the WindowsIdentity, from inside a Handler var windowsIdentity = WindowsIdentity.GetCurrent(true); But this is giving me null. What am I doing wrong? ...

NServiceBus - How to pass custom headers in the Message envelop?

I want to be able to attach the windows authentication token without having to include that piece of data on the messages themselves. I've noticed that TransportMessage has Headers, but how do I get access to that before Send message to server? ...

NServiceBus setting time to be received

Can you set TTBR (Time To Be Received) on a message sent using NServiceBus? ...

Message Broker Queues and MessageType

What's the standard wisdom and considerations for dividing up a message queue? Assuming relatively small number of messages (< 1000/day), does it make sense to combine multiple message types into a single queue and have consumers use selectors to filter them? Or, should a single queue only handle a single message type? A couple of pos...

IoC, Containers, and NServiceBus confusion

Hey guys, here's my setup Castle Windsor is my container NServiceBus is itself using it's own container internally, Spring by default I'm implementing the PubSub config. Ok, if I have my Bus.Publish happening within my IWantToRunAtStartup class, then everything is fine. As a test for example on Run() we can start a timer and it'll go...