loekd/ServiceFabric.ServiceBus

Help with Demo

Closed this issue · 6 comments

Hi Loek,

I'm trying to experiment with the demo app that you've provided but I can't seem to get it to work. I'm trying to send a message to the Stateless queue after having set up the queues. Hitting option 5 causes the client app to simply freeze on this line
servicePartitionClient.InvokeWithRetry(c => c.SendMessage(CreateMessage(requireSessions)));

Subsequently, inserting an item onto the queue using an alternative method and then testing out the listener doesn't seem to yield anything.

Usually I would dig further into the code using debugging to figure out what I must be missing but I can't for the life of me figure out how to debug the .net core project that hosts the ServiceFabric.ServiceBus.Services code.

The old method of simply adding it as a project reference and then stepping through it doesn't work. Could you point me towards any resources that would help explain how I can debug and subsequently walk through the services code to figure out what I'm missing? I'm quite new to .net core and I can't find examples to do so anywhere.

Thanks,

Denis

Ok, so I copied the communication listener code into the stateless project so I can debug it. It seems exceptions are being thrown which I was unaware of.

So the first issue was that I was using the connection strings generated for the specific queue which included an EntityPath definition which wasn't liked. I've gone and switched to keys specific to the service bus.

Next up, it seems that the following line throws an exception saying that it requires a manage claim.
bool requiresSession = await RequiresSession();

Thus at least temporarily I've gone and added a manage claim to both keys.

I'm now getting a message when the following line is called
protected override Task ReceiveMessageImplAsync(BrokeredMessage message, CancellationToken cancellationToken)

It definitely looks like the issue is that the following line needs a manage claim to operate, which is what causes the demo to lock up without throwing a noticeable exception
var queue = await namespaceMgr.GetQueueAsync(ServiceBusQueueName);

loekd commented

Thank you for taking the time to investigate and provide feedback! In version 3.3.0 this issue should be fixed.

Thanks Loek, by chance do you have any suggestions regarding how to debug a .net core project? I've looked all over the place and it isn't obvious. Copying in the files temporarily is less than ideal.

loekd commented

The pdb's are available. Use the symbols from the public server as described here: http://www.symbolsource.org/Public/Home/VisualStudio
Manually open the file you want to debug, and put a breakpoint.
Option two would be to install .net core on your machine, compile the project to get the PDB's and manually load symbols using the Debug->Windows ->Modules window in Visual Studio.

Thanks Loek, greatly appreciate it