particular / nservicebus Goto Github PK
View Code? Open in Web Editor NEWBuild, version, and monitor better microservices with the most powerful service platform for .NET
Home Page: https://particular.net/nservicebus/
License: Other
Build, version, and monitor better microservices with the most powerful service platform for .NET
Home Page: https://particular.net/nservicebus/
License: Other
A FileLoadException (Could not load file or assembly. Access is denied.) is being thrown by the HostServiceLocator on line 25 (NServiceBus v2.5) when starting many endpoints simultaneously (Easy to repro with 20+ endpoints). This doesn't seem to be a problem with windows file system permissions or background indexers/virus scanners deadlocking the files.
Magnum.StateMachine.StateMachineException was unhandled
Message=Exception occurred in
Topshelf.Internal.ServiceController`1[[NServiceBus.Host.Internal.GenericHost,
NServiceBus.Host, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=9fc386479f8a226c]] during state Initial while handling OnStart
Source=NServiceBus.Host
StackTrace:
Server stack trace:
at Magnum.StateMachine.ExceptionActionDictionary`1.HandleException(T
stateMachine, Event event, Object parameter, Exception exception)
at Magnum.StateMachine.EventActionList`1.Execute(T stateMachine, Event
event, Object parameter)
at Magnum.StateMachine.State`1.RaiseEvent(T instance, BasicEvent`1
eevent, Object value)
at Magnum.StateMachine.StateMachine`1.RaiseEvent(Event raised)
at
System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr
md, Object[] args, Object server, Int32 methodPtr, Boolean fExecuteInContext,
Object[]& outArgs)
at
System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage
msg, Int32 methodPtr, Boolean fExecuteInContext)
Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage
reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData&
msgData, Int32 type)
at Topshelf.Internal.ServiceControllerProxy.Start()
at Topshelf.Internal.ServiceCoordinator.Start()
at Topshelf.Internal.Hosts.ConsoleHost.Run()
at NServiceBus.Host.Program.Main(String[] args)
InnerException:
Message=Exception when starting endpoint, error has been logged. Reason:
Could not load file or assembly 'file:///MyEndpoint.dll' or one of its dependencies.
Access is denied.
Source=NServiceBus.Host
StackTrace:
at NServiceBus.Host.Internal.GenericHost.Start()
at Magnum.StateMachine.EventActionList`1.Execute(T stateMachine,
Event event, Object parameter)
InnerException:
At the moment you get a StackOverflowException if you attempt to use the ISet or HashSet type on messages. It would be good if you could add support for this?
Messages containing properties of type Tuple cause the XML serializer to throw an exception.
NServiceBus.Utils.GetFullPath() states it will allow either an IP address or a machine name after the @ in a queue specifier. However when I try to use the IP address in the input queue name (so that replies are routed by IP address when the remote server can't resolve the name), NServiceBus.Unicast.Transport.Msmq.MsmqTransport.CheckConfiguration() throws and exception because it only accepts the machine name.
I found the bug in the MessageMapper implementation. Here is a detailed description of it:
http://www.filedropper.com/nservicebus-messagemapper-bug
In short:
We have a message with a supressionattribute. The suppressionattribute does not have a default constructor. When the default constructor is acquired in AddCustomAttributeToProperty the constructor info is null. the next line does not check for null and creates a CustomAttributeBuilder with null as input argument. This fails.
Could you fix that?
Daniel
Manual like we did before. Include NServiceBus.Testing.dll
When passing a DateTime of kind Utc, the subsctract of DateTime.Now can result in the wrong result.
protected void RequestTimeout(DateTime at, object withState)
{
RequestTimeout(at - DateTime.Now, withState);
}
Should be:
protected void RequestTimeout(DateTime at, object withState)
{
RequestTimeout(at.ToLocalTime() - DateTime.Now, withState);
}
The script needs to aborted when compilation fails
The current public package is a mess and needs to be cleaned up , we can do this manually for now:
https://github.com/aaronjensen/nservicebus.objectbuilder.ninject
Don't forget to add ninject to the test project as well
We need to upgrade and verify that everything works given that TS has removed the support for isolated services (separate appdomains)
Edit "Start external program" user configuration of the project to use NServiceBus.Host.exe
Are we 100% sure that we need to do this for nuget to work?
The reason I ask is that I have a hunch that it won't work on the buildservers since we can run as admin.
Upgrade the master to use Autofac 2.3
in src\hosting\NServiceBus.Hosting.Windows\Program.cs, a check is done(line 38) for a config file and always throws an error. The expected result is to not throw the error, and informational message or warning could replace it.
When using the generic host, create the queues as a part of the install process (as it will most likely be running under the admin privileges needed).
The property NHibernateProperties is typed as NServiceBus.Unicast.Subscriptions.NHibernate.Config.NHibernatePropertyCollection instead of
NServiceBus.Config.NHibernatePropertyCollection like how its defined in the NHibernateSagaPersisterConfig class.
There is no reason why these types should be different in both these classes.
This causes problems, when I try to add code to load both these configurations from the database assigning NHibernateProperties in code.
Right now the transactional transport is non-transactional by default.
I would suggest that we make it transactional by default and remove the
Transactional() config method with NonTransactional()
Hi,
I'm sending message that contains Dictionary<string, object> property. Serialization works fine, but dictionary values disappear during deserialization. Dictionary contains pairs like <string, int>, <string, decimal>, <string, string> etc.
After spending some times debugging I found out that problem is related with this part of code:
public class MessageSerializer
private object GetPropertyValue(Type type, XmlNode n) {
foreach (XmlNode xn in n.ChildNodes) // go over KeyValuePairs
{
object key = null;
object value = null;
foreach (XmlNode node in xn.ChildNodes)
{
if (node.Name == "Key")
key = GetObjectOfTypeFromNode(keyType, node);
// node.Name for pairs in my dictionary are string:Value, decimal:Value, int32:Value, so none of these values are deserialized
if (node.Name == "Value")
value = GetObjectOfTypeFromNode(valueType, node);
}
if (result != null && key != null) result[key] = value;
}
Adding "else if" block fixed this:
if (node.Name == "Value") {
value = GetObjectOfTypeFromNode(valueType, node);
}
if (node.Name == "Value") {
value = GetObjectOfTypeFromNode(valueType, node);
}
else if (node.Name.Contains(":")) // should I use .EndsWith(":Value") instead?
{
Type dictValueType = Type.GetType("System." + node.Name.Substring(0, node.Name.IndexOf(":")), false, true);
value = GetObjectOfTypeFromNode(dictValueType, node);
}
Currently requires a UnicastBusConfig section to expose a WCF endpoint.
Branch: master
Repro:
Specify a DistributorControlAddress and a DistributorDataAddress in the App.config of MyServer in the RequestResponce sample and launch the debugger.
(This also happens in my test project using different object builders)
Result:
NServiceBus.Grid.MessageHandlers.ReadyManager.SendReadyMessage() (ReadyManager.cs line 41) is invoked before the Bus is initialised/started. This results in Transport.NumberOfWorkerThreads returning zero and Bus.Send(DistributorControlAddress, messages) (ReadyManager.cs line 70) being invoked with an empty set of messages. Even if messages where being sent the Bus would still exception as it is not yet started.
This means that buses cannot be configured to use Distributor.
It looks like SendReadyMessage() on the Grid.ReadyManager is being invoked too early during spin up.
Sorry I haven’t submitted an automated test
The host package fails to install because it depends on the NServiceBus package
See the tests in When_using_childcontainers where spring is excluded
The following files are installed when I install the 3.0.0.0 package
Directory: C:\Users\andreas.ohlund\nsbnuget\NServiceBus.3.0.0.0\lib\net35
Mode LastWriteTime Length Name
d---- 2011-06-08 21:20 containers
d---- 2011-06-08 21:20 x64
-a--- 2011-06-08 21:20 270336 log4net.dll
-a--- 2011-06-08 21:20 3760128 NServiceBus.Core.dll
-a--- 2011-06-08 21:20 8168960 NServiceBus.Core.pdb
-a--- 2011-06-08 21:20 3014021 NServiceBus.Core.xml
-a--- 2011-06-08 21:20 22016 NServiceBus.dll
-a--- 2011-06-08 21:20 669184 NServiceBus.Host.exe
-a--- 2011-06-08 21:20 1504768 NServiceBus.Host.pdb
-a--- 2011-06-08 21:20 36272 NServiceBus.Host.xml
-a--- 2011-06-08 21:20 669184 NServiceBus.Host32.exe
-a--- 2011-06-08 21:20 1504768 NServiceBus.Host32.pdb
-a--- 2011-06-08 21:20 36274 NServiceBus.Host32.xml
-a--- 2011-06-08 21:20 48640 NServiceBus.pdb
-a--- 2011-06-08 21:20 338944 NServiceBus.Testing.dll
-a--- 2011-06-08 21:20 794112 NServiceBus.Testing.pdb
-a--- 2011-06-08 21:20 273965 NServiceBus.Testing.xml
-a--- 2011-06-08 21:20 53011 NServiceBus.xml
-a--- 2011-06-08 21:20 135168 nunit.framework.dll
-a--- 2011-06-08 21:20 886272 System.Data.SQLite.DLL
I get the following error when running packit: (why am I getting promted for the OnlyUseLatestCLR)
PS C:\Users\andreas.ohlund\dev\NServiceBus\packages\nuget\PackagingUtils> .\packit.ps1
Value OnlyUseLatestCLR exists, overwrite(Yes/No)? Y
The operation completed successfully.
Value OnlyUseLatestCLR exists, overwrite(Yes/No)? Y
The operation completed successfully.
Rename-Item : Cannot create a file when that file already exists.
At C:\Users\andreas.ohlund\dev\NServiceBus\packages\nuget\PackagingUtils\RunOnce.ps1:4 char:12
Please restart and execute me a again
PS C:\Users\andreas.ohlund\dev\NServiceBus\packages\nuget\PackagingUtils> .\packit.ps1
Value OnlyUseLatestCLR exists, overwrite(Yes/No)? Y
The operation completed successfully.
Value OnlyUseLatestCLR exists, overwrite(Yes/No)? Y
The operation completed successfully.
Rename-Item : Cannot create a file when that file already exists.
At C:\Users\andreas.ohlund\dev\NServiceBus\packages\nuget\PackagingUtils\RunOnce.ps1:4 char:12
Please restart and execute me a again
Running the InMemorySagaPersister under high load and with multiple worker threads causes "Collection has been modified" exceptions in the Get method. The Save methods potentially corrupt the dictionary.
See the tests in When_using_childcontainers where unity is excluded
Remove the build-net4.0.bat-> we already have a build.bat that builds for net4 so you can use that one instead.
I also suggest that you add a psake script in the root that does all the things you need (call nant for now) and then the copy and then packit.ps1
Include nuget.exe in our source in order to not require the build server to have it installed.
Put it into ./tools/nuget/
"Packages" will soon be used to contain our own package references so we need to move the packit things to
/master/nuget
Look at Simple.Data for inspiration (I like the naming and folder structure)
Just spent several hours overlooking my nservicebus configurations till I found out that the following code is syntactically correct but does not publish the message:
this.Bus.Publish();
when I use this.Bus.Publish(m => { });
v2.5
it works!
Add packages and dependencies to the container package + the nservicebus package
Got the following from Thor Halvor Frivold:
When doing this i looked at the ReturnToSourceQueue in the git trunk:
var message = queue.ReceiveById(messageId, TimeoutDuration, MessageQueueTransactionType.Automatic);
if (message == null)
Console.WriteLine(NoMessageFoundErrorFormat, messageId);
else
using (var q = message.ResponseQueue)
q.Send(message, MessageQueueTransactionType.Automatic);
this is incorrect and will send the message back to original Sender (who does not have an endpoint for this endpoint and it is therefore lost) (and sometimes the responsequeue element is not even there)
The correct code is in the exe packed in the downloadable code. (code which gets the responsequeue from the element in the label)
string failedQueue = MsmqTransport.GetFailedQueue(m); m.Label = MsmqTransport.GetLabelWithoutFailedQueue(m); using (MessageQueue queue = new MessageQueue(failedQueue)) { Console.WriteLine("Returning message with id " + messageId + " to queue " + failedQueue); queue.Send(m, MessageQueueTransactionType.Automatic); }
Add support for pushing our debug symbols using the nuget integration with symbol source
http://docs.nuget.org/docs/creating-packages/creating-and-publishing-a-symbol-package
There should be no need to explicitly point to a endpoint config class the that part of host package can be removed
deprecating the associated interface on the Configurer stuff which accepts ComponentCallEnum and then exposing a newer interface that works with a new DependencyLifecycle enum. Under the hood the containers and builder stuff would work with DependencyLifecycle.
The names currently are:
“None” means “the default for the container”, it’s not used anywhere.
“Singleton” means the container will only construct one instance and all calls will return the same reference.
“Singlecall” means that the container will build a new one each time “Build” is called.
In discussion with Andreas we determined that some different names might better to avoid confusion between the meaning of “Singlecall” and “Singleton”. The names are:
SingleInstance, formally Singleton
InstancePerUnitOfWork
InstancePerCall
I have been using 2.5 through NuGet and it's been wonderful except for one thing. Every time I add a reference and all I want in just NServiceBus.dll and NServiceBus.Core.dll I get all of the other extraneous dlls for the various DI containers and such.
It would be great if NServiceBus was broken down more like Castle Windsor. Perhaps you could have a package that just had NServicesBus.dll and NServiceBus.Core.dll and call it something like NServiceBus Core and then one for Host that then referenced the core. You could even separate the DI containers as well.
When a subscriber does not have the MsmqTransportConfig section defined in its app.config file, an exception is thrown during Bus.Start (UnicastBus.cs, line 716) when it attempts call transport.Address.ToLower(). It should throw a more helpful exception, stating that a subscriber must have MsmqTransportConfig defined.
The documentation on NServiceBus.com regarding pub/sub also does not mention that a subscriber must have both UnicastBusConfig and MsmqTransportConfig sections defined.
The assembly version for the 2.5.1 release of NServiceBus.ObjectBuilder.CastleWindsor on nuget is incorrect. It is built as 1.0.0.0
[Test]
public void Single_call_components_in_the_parent_container_should_be_singletons_in_the_child_container()
{
VerifyForAllBuilders(builder =>
{
builder.Configure(typeof(InstancePerUoWComponent), DependencyLifecycle.InstancePerUnitOfWork);
var nestedContainer = builder.BuildChildContainer();
Assert.AreEqual(nestedContainer.Build(typeof(InstancePerUoWComponent)), nestedContainer.Build(typeof(InstancePerUoWComponent)));
},
typeof(SpringObjectBuilder),
typeof(UnityObjectBuilder),
typeof(NinjectObjectBuilder));
should that be:
The description of the test does not match with the implemented specification. Is this copy paste to blame?
}
Manually create the packages and add the corresponding dependencies (container + NServiceBus package)
NServiceBus.Host.2.5.nupkg -> NServiceBus.Host.2.5.0.1446
Right now if there is an exception calling the fault manager we just rollback and there by causing an endless loop.
We should catch the error and log it as a fatal error and then exit the process to prevent the loss off messages.
Include NServiceBus.Testing.dll
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.