qpid-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jonathan Robie (JIRA)" <qpid-...@incubator.apache.org>
Subject [jira] Created: (QPID-750) MessageFlow needs sensible defaults, defined constants
Date Fri, 18 Jan 2008 15:25:34 GMT
MessageFlow needs sensible defaults, defined constants
------------------------------------------------------

                 Key: QPID-750
                 URL: https://issues.apache.org/jira/browse/QPID-750
             Project: Qpid
          Issue Type: Improvement
          Components: C++ Client
            Reporter: Jonathan Robie


Currently, the C++ client must explicitly allocate credit with messageFlow to receive messages,
e.g. 

     session.messageSubscribe(arg::queue="message_queue", arg::destination="listener_destination");
     session.messageFlow(arg::destination="listener_destination", arg::unit=0, arg::value=1);//messages
### Define a constant?
     session.messageFlow(arg::destination="listener_destination", arg::unit=1, arg::value=0xFFFFFFFF);//bytes
###### Define a constant?

This complicates introductory examples and simple programs. It would be helpful to have a
sensible default message flow that is used if the user does not explicitly allocate credit.
(I am guessing that it's unlikely that someone would want to subscribe to a queue and not
receive messages, so we don't have to worry about this case.)

Even when explicit control over the number and size of messages received is important, there
are no defined constants to make it clear what the above calls mean. How is the programmer
supposed to know that arg::unit=0 in the second parameter means setting the number of messages
to receive? Defined constants would make this code much more readable.

What guidelines should we give users for the settings of message flow parameters in real programs?

Jonathan

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message