URISupport.ParseQuery Exception for Failover URI with Query
- Dominant language
- Java
- Stars
- 2.5k
- Forks
- 1.5k
- Avg merge
- 10h 46m
- Merged PRs (30d)
- 79
Description
This concerns Apache.NMS or Apache.NMS.ActiveMQ but issues are not enabled for those repos, there is no dedicated project to create a JIRA account, and mailing list discussion suggests to make issues here.
Failover URIs with query arguments in the failover portion throw an exception in `URISupport.ParseQuery`. This occurs using the following:
`var uri = URISupport.CreateCompatibleUri("failover:(ssl://broker-0.example.com:61617?keepAlive=true,ssl://broker-1.example.com:61617?keepAlive=true)");`
`var parsed = URISupport.ParseQuery(uri.Query);`
> Apache.NMS.NMSException
HResult=0x80131500
Message=Invalid Uri parameter: keepAlive=true,ssl://broker-1.example.com:61617?keepAlive=true)
Source=Apache.NMS
StackTrace:
at Apache.NMS.Util.URISupport.ParseQuery(String query)
at ActiveMQFailoverTest.Program.Main(String[] args) in ...:line 11
If `URISupport.ParseQuery` is not intended to be used in this simpified example, this issue occurs with the following trace in conjunction with Apache.NMS.ActiveMQ:
> Stack Trace:
at Apache.NMS.Util.URISupport.ParseQuery(String query)
at Apache.NMS.ActiveMQ.Transport.Tcp.TcpTransportFactory.CompositeConnect(Uri location)
at Apache.NMS.ActiveMQ.Transport.Tcp.TcpTransportFactory.CreateTransport(Uri location)
Digging deeper, the Uri object is not parsing this failover URI very well. This does not look avoidable due to arguments in Apache.NMS.ActiveMQ accepting string representations of URIs convert them into Uri objects fairly quickly.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start at URISupport.ParseQuery and reproduce the supplied failover URI with query arguments. Trace the related Apache.NMS.ActiveMQ path through TcpTransportFactory.CompositeConnect, then verify that failover URIs with per-broker queries are parsed without the reported exception.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, java
- Domain
- backend, networking
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100