in reply to Net::Stomp receive_frame method always blocks (ignores timeout parameter)

From looking at the code of Net/Stomp.pm, it seems that the timeout will only ever apply to receiving the first byte of a frame, not to reading the whole frame.

Have you looked at employing one of the event-based systems, like AnyEvent or POE (which has POE::Component::MessageQueue that claims to be STOMP)?

  • Comment on Re: Net::Stomp receive_frame method always blocks (ignores timeout parameter)

Replies are listed 'Best First'.
Re^2: Net::Stomp receive_frame method always blocks (ignores timeout parameter)
by PPJ (Initiate) on Aug 16, 2010 at 13:25 UTC
    Thanks Corion.

    Does that mean that the timeout parameter in Net::Stomp actually has no useful effect? Or if it does have an effect, how can it be put into practice?

    I'll look into the other modules you mention.

      Hi again,

      Found another CPAN package which also does the job: Net::STOMP::Client

      Timeout works on this with no drama.

      Thanks again.