wdcossey / Apache.NMS.ActiveMQ.NetStd

Apache NMS for ActiveMQ Class Library (.Net Messaging Library Implementation): An implementation of the NMS API for ActiveMQ
Apache License 2.0
14 stars 8 forks source link

Connection start - io+ssl factory attribute doesn't match type with AttributeType #9

Open Ryujose opened 4 years ago

Ryujose commented 4 years ago

Main issue

We're trying to use "failover:(nio+ssl)" on our connection string, but when we execute the connection start the "FactoryAttribute" it isn't validated well, the results is always "false" with "AttributeType"

Possible solution

If I compare it with an "is" validation with "Attribute" class then the result is "true"

Location

Happens on Apache.NMS.ActiveMQ.Util namespace, class FactoryFinder, line 108 "if (attribute is AttributeType)"

https://github.com/wdcossey/Apache.NMS.ActiveMQ.NetStd/blob/master/src/Util/FactoryFinder.cs#L108

Current implementation

[Factory("nio+ssl")] public class ConfigurationFactoryIdentifier { }

Full connection string: failover:(nio+ssl://host1:port1,nio+ssl://host2:port2)