You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@synapse.apache.org by Mehdi Ait Oufkir <me...@gmail.com> on 2008/01/08 19:10:14 UTC

JMS proxy dequeuing even if endpoint is down

Hi,

I'm running into a problem while using a proxy listening from a queue
via JMS end sending an HTTP request.


My proxy is reading from the queue, but even if the server is down and
not rejecting HTTP requests, it's removing from the queue and just
failing doing the request.

How can I handle that in a nicer way. I'd like to have the message
staying in the queue if the server is down. Is there another work
around below is the configuration I'm using for the proxy:

   <proxy name="SimpleStockQuoteProxy" transports="jms">
        <target>
            <endpoint key="server"/>
            <inSequence>
                <property action="set" name="OUT_ONLY" value="false"/>
            </inSequence>
            <outSequence>
              <send/>
            </outSequence>
        </target>
        <publishWSDL
uri="file:repository/conf/sample/resources/proxy/sample_proxy_1.wsdl"/>
    </proxy>


    <endpoint name="server">
      <address uri="http://localhost:9000/soap/SimpleStockQuoteService"/>
    </endpoint>


Please advice,
Mehdi Ait Oufkir

---------------------------------------------------------------------
To unsubscribe, e-mail: synapse-user-unsubscribe@ws.apache.org
For additional commands, e-mail: synapse-user-help@ws.apache.org


Re: JMS proxy dequeuing even if endpoint is down

Posted by "Asankha C. Perera" <as...@wso2.com>.
Mehdi
> There is no way to find a work around?
>   
Here are somethings that I can think of from the top of my head..

1. For each received message, acknowledge just one message at a time,
which we know is ready to be acked (By default ack on a message acks all
messages read during that Session) - This is the simplest way to do this
and is available for example with the Sun JMS implementation
<http://docs.sun.com/source/819-0068/progfeatures.html#wp33087>

2. Use a ServerSessionPool (defined on the JMX spec but listed as
"optional") to create multiple sessions so that the receipt of every
single message could take place over a new Session. Your JMS
drivers/provider should support this..

3. Implement a manual Session pooling, where multiple Sessions are used
to process messages concurrently - so that each Session/Message could be
acked independently via a separate Session

4. Integrate with Atomikos (http://www.atomikos.com/products.html#ate)

However, some options may require the support of your JMS provider,
while the more generic option to support JTA transactions from Synapse,
would require some coding :).. Since we already have a JIRA in Synapse,
we will work on this in the relative order of priority, however if this
critical for your deployment and you need this urgently, drop me a mail
at: asankha@wso2.org to see what might be possible

asankha

Re: JMS proxy dequeuing even if endpoint is down

Posted by Mehdi Ait Oufkir <me...@gmail.com>.
There is no way to find a work around?

mehdi

On Jan 8, 2008 10:16 AM, Asankha C. Perera <as...@wso2.com> wrote:
> Mehdi
>
> We have been considering this for sometime, and this is tracked by the
> enhancement request http://issues.apache.org/jira/browse/SYNAPSE-181. We
> also have some discussion on how we could achieve this, but still this
> is not implemented in Synapse
>
> asankha
>
>
> Mehdi Ait Oufkir wrote:
> > Hi,
> >
> > I'm running into a problem while using a proxy listening from a queue
> > via JMS end sending an HTTP request.
> >
> >
> > My proxy is reading from the queue, but even if the server is down and
> > not rejecting HTTP requests, it's removing from the queue and just
> > failing doing the request.
> >
> > How can I handle that in a nicer way. I'd like to have the message
> > staying in the queue if the server is down. Is there another work
> > around below is the configuration I'm using for the proxy:
> >
> >    <proxy name="SimpleStockQuoteProxy" transports="jms">
> >         <target>
> >             <endpoint key="server"/>
> >             <inSequence>
> >                 <property action="set" name="OUT_ONLY" value="false"/>
> >             </inSequence>
> >             <outSequence>
> >               <send/>
> >             </outSequence>
> >         </target>
> >         <publishWSDL
> > uri="file:repository/conf/sample/resources/proxy/sample_proxy_1.wsdl"/>
> >     </proxy>
> >
> >
> >     <endpoint name="server">
> >       <address uri="http://localhost:9000/soap/SimpleStockQuoteService"/>
> >     </endpoint>
> >
> >
> > Please advice,
> > Mehdi Ait Oufkir
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: synapse-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: synapse-user-help@ws.apache.org
> >
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: synapse-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: synapse-user-help@ws.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: synapse-user-unsubscribe@ws.apache.org
For additional commands, e-mail: synapse-user-help@ws.apache.org


Re: JMS proxy dequeuing even if endpoint is down

Posted by "Asankha C. Perera" <as...@wso2.com>.
Mehdi

We have been considering this for sometime, and this is tracked by the
enhancement request http://issues.apache.org/jira/browse/SYNAPSE-181. We
also have some discussion on how we could achieve this, but still this
is not implemented in Synapse

asankha

Mehdi Ait Oufkir wrote:
> Hi,
>
> I'm running into a problem while using a proxy listening from a queue
> via JMS end sending an HTTP request.
>
>
> My proxy is reading from the queue, but even if the server is down and
> not rejecting HTTP requests, it's removing from the queue and just
> failing doing the request.
>
> How can I handle that in a nicer way. I'd like to have the message
> staying in the queue if the server is down. Is there another work
> around below is the configuration I'm using for the proxy:
>
>    <proxy name="SimpleStockQuoteProxy" transports="jms">
>         <target>
>             <endpoint key="server"/>
>             <inSequence>
>                 <property action="set" name="OUT_ONLY" value="false"/>
>             </inSequence>
>             <outSequence>
>               <send/>
>             </outSequence>
>         </target>
>         <publishWSDL
> uri="file:repository/conf/sample/resources/proxy/sample_proxy_1.wsdl"/>
>     </proxy>
>
>
>     <endpoint name="server">
>       <address uri="http://localhost:9000/soap/SimpleStockQuoteService"/>
>     </endpoint>
>
>
> Please advice,
> Mehdi Ait Oufkir
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: synapse-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: synapse-user-help@ws.apache.org
>
>
>   

---------------------------------------------------------------------
To unsubscribe, e-mail: synapse-user-unsubscribe@ws.apache.org
For additional commands, e-mail: synapse-user-help@ws.apache.org