pardahlman / RawRabbit

A modern .NET framework for communication over RabbitMq
MIT License
747 stars 144 forks source link

ApplicationQueueSuffix issue. #227

Closed Towmeykaw closed 7 years ago

Towmeykaw commented 7 years ago

Hello! I had an issue when using the ApplicationQueueSuffix plugin. When i use commandline parameters this tries to match the parameter instead of the name.

var index = commandLine.Length > 1 ? 1 : 0;
if (DllRegex.IsMatch(commandLine[index]))

For now i fixed it by using UseCustomQueueSuffix(PlatformServices.Default.Application.ApplicationName.Replace(".", "_")) Which seems to work fine.

pardahlman commented 7 years ago

Hello, @Towmeykaw - sounds like you've been hit by #193. It is a known issue for all platforms but Windows running on full .NET framework.

I didn't know about PlatformServices, looks very interesting. If you want to look into this further, I'm open for a PR that solves #193 on all platforms.

garethrampton commented 7 years ago

@pardahlman PlatformServices is actually deprecated for Core 2.0, so we're back to Assembly.GetEntryAssembly().GetName().Name to get the current application name again (> .NET Standard 1.5). See https://github.com/aspnet/PlatformAbstractions/issues/50

pardahlman commented 7 years ago

Thanks for your input, @garethrampton - there are some interesting discussion in that ticket. @Towmeykaw, I'll close this issue for now, as it is a duplicate of #193