How to set Delivery Time of message - Weblogic

This is a discussion on How to set Delivery Time of message - Weblogic ; Hi, Is there anyway i cant set the delivery time of messages while publishing?? Say i want to delay the messages being available to the subscribers by an hour or so, from the time i publish. Jay...

+ Reply to Thread
Results 1 to 6 of 6

Thread: How to set Delivery Time of message

  1. How to set Delivery Time of message


    Hi,
    Is there anyway i cant set the delivery time of messages while publishing??
    Say i want to delay the messages being available to the subscribers by an hour
    or so, from the time i publish.
    Jay

  2. Re: How to set Delivery Time of message


    Jay


    There are parameters available on both the JMS ConnectionFactory as well as JMS
    Destination configuration.

    You can either set "DefaultTimeToDeliver" parameter value on the connection factory
    so that all the clients using that connection factory can get that value or you
    can override this default value at the individual destination by setting "TimeToDeliverOverride"
    parameter value.

    If you want to set a value at the producer level, then you can use the WLS specific
    Producer extension like:

    ((weblogic.jms.extensions.WLMessageProducer)qsende r).setTimeToDeliver(timeToDeliver);

    Please look at the documentation for more help:

    http://e-docs.bea.com/wls/docs81/Con...ms_config.html
    http://e-docs.bea.com/wls/docs81/jav...eProducer.html



    Kats
    BEA


    "Jay" wrote:
    >
    >Hi,
    >Is there anyway i cant set the delivery time of messages while publishing??
    >Say i want to delay the messages being available to the subscribers by
    >an hour
    >or so, from the time i publish.
    >Jay



  3. Re: How to set Delivery Time of message


    Kats,
    Thanks for the information.
    I have another situation where in after the message is set to be delivered after
    an hour, the server crashes due to some unknown reason before the stipulated one
    hour. Is there any way i can make the server store the messages temporarily and
    make it available after the server is up.
    Thanks & Regards
    Jay

    "Kats" wrote:
    >
    >Jay
    >
    >
    >There are parameters available on both the JMS ConnectionFactory as well
    >as JMS
    >Destination configuration.
    >
    >You can either set "DefaultTimeToDeliver" parameter value on the connection
    >factory
    >so that all the clients using that connection factory can get that value
    >or you
    >can override this default value at the individual destination by setting
    >"TimeToDeliverOverride"
    >parameter value.
    >
    >If you want to set a value at the producer level, then you can use the
    >WLS specific
    >Producer extension like:
    >
    >((weblogic.jms.extensions.WLMessageProducer)qsende r).setTimeToDeliver(timeToDeliver);
    >
    >Please look at the documentation for more help:
    >
    >http://e-docs.bea.com/wls/docs81/Con...ms_config.html
    >http://e-docs.bea.com/wls/docs81/jav...eProducer.html
    >
    >
    >
    >Kats
    >BEA
    >
    >
    >"Jay" wrote:
    >>
    >>Hi,
    >>Is there anyway i cant set the delivery time of messages while publishing??
    >>Say i want to delay the messages being available to the subscribers

    >by
    >>an hour
    >>or so, from the time i publish.
    >>Jay

    >



  4. Re: How to set Delivery Time of message


    Hi Jay,

    You can make your message queues and topics persistent by configuring either a
    file store or a JDBC store:

    http://e-docs.bea.com/wls/docs81/Con...toretable.html

    If you want to make the topic persistent then you have to configure a durable
    susbscriber as well:

    http://e-docs.bea.com/wls/docs81/jms...t.html#1097632

    For queues, messages will be stored until a consumer removes them. For topics,
    all messages will be stored until all durable subscribers have received a copy
    of the message.

    Regards,

    Graham





    "Jay" wrote:
    >
    >Kats,
    >Thanks for the information.
    >I have another situation where in after the message is set to be delivered
    >after
    >an hour, the server crashes due to some unknown reason before the stipulated
    >one
    >hour. Is there any way i can make the server store the messages temporarily
    >and
    >make it available after the server is up.
    >Thanks & Regards
    >Jay
    >
    >"Kats" wrote:
    >>
    >>Jay
    >>
    >>
    >>There are parameters available on both the JMS ConnectionFactory as

    >well
    >>as JMS
    >>Destination configuration.
    >>
    >>You can either set "DefaultTimeToDeliver" parameter value on the connection
    >>factory
    >>so that all the clients using that connection factory can get that value
    >>or you
    >>can override this default value at the individual destination by setting
    >>"TimeToDeliverOverride"
    >>parameter value.
    >>
    >>If you want to set a value at the producer level, then you can use the
    >>WLS specific
    >>Producer extension like:
    >>
    >>((weblogic.jms.extensions.WLMessageProducer)qsende r).setTimeToDeliver(timeToDeliver);
    >>
    >>Please look at the documentation for more help:
    >>
    >>http://e-docs.bea.com/wls/docs81/Con...ms_config.html
    >>http://e-docs.bea.com/wls/docs81/jav...eProducer.html
    >>
    >>
    >>
    >>Kats
    >>BEA
    >>
    >>
    >>"Jay" wrote:
    >>>
    >>>Hi,
    >>>Is there anyway i cant set the delivery time of messages while publishing??
    >>>Say i want to delay the messages being available to the subscribers

    >>by
    >>>an hour
    >>>or so, from the time i publish.
    >>>Jay

    >>

    >



  5. Re: How to set Delivery Time of message


    Hi Graham,
    MDB is sbuscribed to a TOPIC, to which messages are published. How do I set my
    MDB as a Durable Subscriber??
    On failure to connect to remote system, I do publish the messages to topic to
    be delivered after an hour so that, the remote system would be UP by that time.
    I've an MDB running which gets invoked exactly after an hour and tries to connect
    the remote system.

    CODE:
    -------------------------------------------------------------------------------------------
    TopicConnectionFactory tcFactory = (TopicConnectionFactory) context.lookup("Jay");

    TopicConnection tConnection = tcFactory.createTopicConnection();
    tConnection.start();
    TopicSesion tSession = tConnection.createTopicSession(false, Session.AUTO_ACKNOWLEDGE);
    Topic topic = (Topic) context.lookup(TOPIC_NAME);
    TopicPublisher tPublisher = tSession.createPublisher(topic);
    TextMessage tMessage = tSession.createTextMessage();
    tMessage.setText("JAY");
    tPublisher.publish(tm);
    ---------------------------------------------------------------------------------------
    MDB:::
    onMessage(Message message)
    {
    ((TestMessage)message).geText();
    }
    -----------------------------------------------------------------------------------------------
    Where do i make changes to make it Durable SUbscriber???

    Thanks & Regards
    Jay

    "Graham" wrote:
    >
    >Hi Jay,
    >
    >You can make your message queues and topics persistent by configuring
    >either a
    >file store or a JDBC store:
    >
    >http://e-docs.bea.com/wls/docs81/Con...toretable.html
    >
    >If you want to make the topic persistent then you have to configure a
    >durable
    >susbscriber as well:
    >
    >http://e-docs.bea.com/wls/docs81/jms...t.html#1097632
    >
    >For queues, messages will be stored until a consumer removes them. For
    >topics,
    >all messages will be stored until all durable subscribers have received
    >a copy
    >of the message.
    >
    >Regards,
    >
    >Graham
    >
    >
    >
    >
    >
    >"Jay" wrote:
    >>
    >>Kats,
    >>Thanks for the information.
    >>I have another situation where in after the message is set to be delivered
    >>after
    >>an hour, the server crashes due to some unknown reason before the stipulated
    >>one
    >>hour. Is there any way i can make the server store the messages temporarily
    >>and
    >>make it available after the server is up.
    >>Thanks & Regards
    >>Jay
    >>
    >>"Kats" wrote:
    >>>
    >>>Jay
    >>>
    >>>
    >>>There are parameters available on both the JMS ConnectionFactory as

    >>well
    >>>as JMS
    >>>Destination configuration.
    >>>
    >>>You can either set "DefaultTimeToDeliver" parameter value on the connection
    >>>factory
    >>>so that all the clients using that connection factory can get that

    >value
    >>>or you
    >>>can override this default value at the individual destination by setting
    >>>"TimeToDeliverOverride"
    >>>parameter value.
    >>>
    >>>If you want to set a value at the producer level, then you can use

    >the
    >>>WLS specific
    >>>Producer extension like:
    >>>
    >>>((weblogic.jms.extensions.WLMessageProducer)qsende r).setTimeToDeliver(timeToDeliver);
    >>>
    >>>Please look at the documentation for more help:
    >>>
    >>>http://e-docs.bea.com/wls/docs81/Con...ms_config.html
    >>>http://e-docs.bea.com/wls/docs81/jav...eProducer.html
    >>>
    >>>
    >>>
    >>>Kats
    >>>BEA
    >>>
    >>>
    >>>"Jay" wrote:
    >>>>
    >>>>Hi,
    >>>>Is there anyway i cant set the delivery time of messages while publishing??
    >>>>Say i want to delay the messages being available to the subscribers
    >>>by
    >>>>an hour
    >>>>or so, from the time i publish.
    >>>>Jay
    >>>

    >>

    >



  6. Re: How to set Delivery Time of message

    Hi Jay,

    This isn't in the docs? Let me check. No, it isn't. How come nobody
    noticed before? Perhaps its in a sample. OK, I'll file a doc request.

    Meanwhile, here's the ejb descriptor setting:


    javax.jms.Topic
    Durable


    Tom

    Jay wrote:

    > Hi Graham,
    > MDB is sbuscribed to a TOPIC, to which messages are published. How do I set my
    > MDB as a Durable Subscriber??
    > On failure to connect to remote system, I do publish the messages to topic to
    > be delivered after an hour so that, the remote system would be UP by that time.
    > I've an MDB running which gets invoked exactly after an hour and tries to connect
    > the remote system.
    >
    > CODE:
    > -------------------------------------------------------------------------------------------
    > TopicConnectionFactory tcFactory = (TopicConnectionFactory) context.lookup("Jay");
    >
    > TopicConnection tConnection = tcFactory.createTopicConnection();
    > tConnection.start();
    > TopicSesion tSession = tConnection.createTopicSession(false, Session.AUTO_ACKNOWLEDGE);
    > Topic topic = (Topic) context.lookup(TOPIC_NAME);
    > TopicPublisher tPublisher = tSession.createPublisher(topic);
    > TextMessage tMessage = tSession.createTextMessage();
    > tMessage.setText("JAY");
    > tPublisher.publish(tm);
    > ---------------------------------------------------------------------------------------
    > MDB:::
    > onMessage(Message message)
    > {
    > ((TestMessage)message).geText();
    > }
    > -----------------------------------------------------------------------------------------------
    > Where do i make changes to make it Durable SUbscriber???
    >
    > Thanks & Regards
    > Jay
    >
    > "Graham" wrote:
    >
    >>Hi Jay,
    >>
    >>You can make your message queues and topics persistent by configuring
    >>either a
    >>file store or a JDBC store:
    >>
    >>http://e-docs.bea.com/wls/docs81/Con...toretable.html
    >>
    >>If you want to make the topic persistent then you have to configure a
    >>durable
    >>susbscriber as well:
    >>
    >>http://e-docs.bea.com/wls/docs81/jms...t.html#1097632
    >>
    >>For queues, messages will be stored until a consumer removes them. For
    >>topics,
    >>all messages will be stored until all durable subscribers have received
    >>a copy
    >>of the message.
    >>
    >>Regards,
    >>
    >>Graham
    >>
    >>
    >>
    >>
    >>
    >>"Jay" wrote:
    >>
    >>>Kats,
    >>>Thanks for the information.
    >>>I have another situation where in after the message is set to be delivered
    >>>after
    >>>an hour, the server crashes due to some unknown reason before the stipulated
    >>>one
    >>>hour. Is there any way i can make the server store the messages temporarily
    >>>and
    >>>make it available after the server is up.
    >>>Thanks & Regards
    >>>Jay
    >>>
    >>>"Kats" wrote:
    >>>
    >>>>Jay
    >>>>
    >>>>
    >>>>There are parameters available on both the JMS ConnectionFactory as
    >>>
    >>>well
    >>>
    >>>>as JMS
    >>>>Destination configuration.
    >>>>
    >>>>You can either set "DefaultTimeToDeliver" parameter value on the connection
    >>>>factory
    >>>>so that all the clients using that connection factory can get that

    >>
    >>value
    >>
    >>>>or you
    >>>>can override this default value at the individual destination by setting
    >>>>"TimeToDeliverOverride"
    >>>>parameter value.
    >>>>
    >>>>If you want to set a value at the producer level, then you can use

    >>
    >>the
    >>
    >>>>WLS specific
    >>>>Producer extension like:
    >>>>
    >>>>((weblogic.jms.extensions.WLMessageProducer)qsende r).setTimeToDeliver(timeToDeliver);
    >>>>
    >>>>Please look at the documentation for more help:
    >>>>
    >>>>http://e-docs.bea.com/wls/docs81/Con...ms_config.html
    >>>>http://e-docs.bea.com/wls/docs81/jav...eProducer.html
    >>>>
    >>>>
    >>>>
    >>>>Kats
    >>>>BEA
    >>>>
    >>>>
    >>>>"Jay" wrote:
    >>>>
    >>>>>Hi,
    >>>>>Is there anyway i cant set the delivery time of messages while publishing??
    >>>>>Say i want to delay the messages being available to the subscribers
    >>>>
    >>>>by
    >>>>
    >>>>>an hour
    >>>>>or so, from the time i publish.
    >>>>>Jay
    >>>>

    >



+ Reply to Thread