A quick look at the code (i.e. org.hornetq.rest.topic.SubscriptionsResource) reveals the exception being thrown is this:
throw new WebApplicationException(Response.status(405)
.entity("Failed to find subscriber " + subscriptionId + " you will have to reconnect")
Although, I'm not sure why it's being translated into a 412 on the client.
Do you have a reproducible test-case? What are the circumstances around the error. What's your use-case?
Thanks for your prompt reply Justin.
Our use case is that we have a topic configured as:
We then have a Rest client that creates an auto-ack subscription as described in the HornetQ Rest doc @ http://docs.jboss.org/hornetq/2.2.5.Final/rest-interface-manual/html_single/#d0e533
As messages are published we want our client to receive the messages using Rest polling. Occassionally, we see the error above when polling for messages.
I wouldn't say that we have a reproducable test-case, rather, we are consistently seeing the exception in our development system. We have a cluster of 2 JBoss servers, both running exactly the same application, and one of the server consistently is getting the exception, whereas the other is not.
FYI, The problem was with the client coding, which wasn't implementing polling correctly. It wasn't getting the new URL to make a request to from the 503 response. This all worked fine for some reason before we used a load-balancer, however, with that in the mix, the URL that the request was made to was invalid, resulting in the bad response.