Permalink
Commits on Feb 10, 2013
  1. Duplicated namespace level consts as class consts and switched the

    internal API  to use  class level  consts.  Nsp  level consts  are now
    present for backwards compat purposes only.
    committed Feb 10, 2013
Commits on Feb 5, 2013
  1. Merge pull request #14 from cloudermaan/master

    Small text update on demos/README.md
    committed Feb 5, 2013
Commits on Feb 4, 2013
  1. Update demos/README.md

    fixed typo "php php producer.php ..."
    fixed path on "php consumer.php --consumer rmq-mon-q ..." assumtion in privious examples that the current directory is demos/
    cloudermaan committed Feb 4, 2013
Commits on Jan 10, 2013
  1. Merge pull request #12 from rotac/master

    Fix of github URL for composer.json
    committed Jan 10, 2013
  2. Fix of github URL. https:// can be cloned without key

    Antonin Crha committed Jan 10, 2013
Commits on Jan 9, 2013
  1. Update composer.json

    committed Jan 9, 2013
  2. Tweak the Code gen stuff to work on php 5.4 and Fedora 17, rebuilt the

    bindings.  Added a composer file to allow packagist / composer use.
    committed Jan 9, 2013
Commits on Apr 22, 2012
  1. Merge branch 'next'

    committed Apr 22, 2012
  2. Altered the event loop so as to detect missed heartbeats from the

    broker.  This means  that if there is unexpected  network loss between
    the  client and  the  broker, the  client  can detect  this using  the
    standard Amqp heartbeat.
    committed Apr 22, 2012
Commits on Mar 4, 2012
Commits on Mar 3, 2012
  1. Some new features, cleanups and stability improvements.

     * Install  and  use  signal  handlers  in the  consumer  demo  (where
       available) -  this means you can  crtl-c a consumer and  it will go
       through the  proper shutdown sequence.   Some corresponding changes
       in the EventLoop implementation (forceLoopExit())
    
     * Allow demo  script to pick  up alternative factory configs  via the
       --config switch
    
     * Always  set non-blocking  mode on  all underlying  sockets  of both
       types.
    
     * Call select() before socket write operations
    
     * Track read /  writer errors in StreamSocket and  make an attempt at
       matching  the  error  reporting  capabilities of  low-level  socket
       implementation.
    
     * When inside the event loop,  deliver messages inside a try / catch,
       when an exception is caught check  to see if the socket has errors,
       if it does  then close the socket / Connection  and remove from the
       event loop.   This means that  if a socket closes  unexpectedly the
       event loop can  recover instead of going in to a  tight loop on the
       select() call.
    committed Mar 3, 2012
Commits on Feb 26, 2012
  1. Fleshed out the error tracking stuff in the StreamSocket class to

    track read and write errors,  tested this with an intentionally broken
    heartbeat.  Tidied up the code in the stream classes, added docblocks,
    and removed all debug code.
    committed Feb 26, 2012
Commits on Feb 25, 2012
  1. Savepoint - attempting to make the select loop more robuust - if one

    of the connections  being watched goes down, warn  lots and gracefully
    remove it rather than exiting the whole loop.
    
     * Untested for multiple connections
     * Untested for the StreamSocket interface
    committed Feb 25, 2012
  2. Updated the socket implementations to both use the system select call

    before attempting to write data,  was seeing very sporadic crashes due
    to the write failing due to a blocking socket.
    
    Minor tinkerings in the demo scripts
    committed Feb 25, 2012
Commits on Feb 12, 2012
Commits on Jan 29, 2012
  1. * Always place streams and sockets in to non-blocking mode.

    * Altered StreamSocket implementation to behave more like the Socket -
      the read() method is effectively a blocking read, while readAll() is
      non-blocking, suitable to be used in an event loop.
    committed Jan 29, 2012
  2. * Switched the generate code to symlink for development

    * Updated socket class to set non block on socket by default.
    
    * Added signal handling capability  to consumer demo to allow graceful
      handling of exit
    
    * Added a forced exit method to event loop so that loops can be exited
      at will (e.g. in response to OS signals)
    committed Jan 29, 2012
Commits on Jan 28, 2012
  1. Changes to the publish confirms feature:

         1. Channel will now save a  copy of each outgoing message when in
         confirm  mode,  this  could   have  RAM  usage  implications  for
         processes that publish large numbers of messages
    
         2. When  confirm (n)acks are  received, the Channel  delivers the
         actual    message    that    is    being   confirmed    to    the
         ChannelEventHandler.  Previously,  the Channel would  deliver the
         incoming ack to the CEH, which is pretty useless because the only
         information held in the ack is the message sequence number (which
         is internal  to the Channel)  and because the broker  often sends
         acks  with multiple=true,  which means  the channel  delivers the
         same incoming ack message many times.
    
    Tweaks  to the  Channel ack  buffering feature,  prompted by  an issue
    reported via. Github:
    
        #7
    
        1.   Only  specify  the  multiple=true  flag  on  (n)acks  if  the
        $ackBuffer  value is  > 1.   This means  that you  can do  "out of
        order"   acking,   whereby   you   return   CONSUMER_*   responses
        intermingled  with NULL  responses, and  the  CONSUMER_* responses
        won't implicitly ack the  messages for which the Consumer returned
        NULL.  Note that  if you do this, it's  your responsibility to ack
        or reject  the messages that  your consumer returned NULL  for, if
        you don't  do this then you'll  end up losing  messages, or having
        messages re-delivered to other consumers.
    
        2.  Some other  minor tweaks,  including changing  the  ack buffer
        implementation to only store the  delivery ID of the last received
        message rather than all  outstanding messages - the implementation
        only actually used the last delivery id, all others were ignored.
    committed Jan 28, 2012
  2. Tweaks to the Channel ack buffering feature, prompted by an issue

    reported via. Github:
    
    #7
    
    Only specify the multiple=true flag on (n)acks if the $ackBuffer value
    is > 1.  This means that you can do "out of order" acking, whereby you
    return CONSUMER_* responses intermingled  with NULL responses, and the
    CONSUMER_* responses  won't implicitly ack the messages  for which the
    Consumer  returned  NULL.   Note  that  if  you  do  this,  it's  your
    responsibility  to  ack or  reject  the  messages  that your  consumer
    returned NULL  for, if  you don't  do this then  you'll end  up losing
    messages, or having messages re-delivered to other consumers.
    
    Some   other  minor   tweaks,  including   changing  the   ack  buffer
    implementation  to only  store the  delivery ID  of the  last received
    message rather than all outstanding messages - the implementation only
    actually used the last delivery id, all others were ignored.
    committed Jan 28, 2012
Commits on Jan 17, 2012
  1. Changes to the publish confirms feature:

     1. Channel  will now  save a  copy of each  outgoing message  when in
     confirm mode,  this could have  RAM usage implications  for processes
     that publish large numbers of messages
    
     2. When confirm (n)acks are received, the Channel delivers the actual
     message   that  is  being   confirmed  to   the  ChannelEventHandler.
     Previously, the  Channel would deliver  the incoming ack to  the CEH,
     which is pretty useless because  the only information held in the ack
     is the message sequence number (which is internal to the Channel) and
     because the  broker often sends acks with  multiple=true, which means
     the channel delivers the same incoming ack message many times.
    committed Jan 17, 2012
Commits on Jan 16, 2012
  1. Enable the producer to send different messages by specifying more than

    one  --message  switch.   Different  messages can  be  sent  different
    numbers of times by using more than one --repeat switch
    committed Jan 16, 2012
Commits on Jan 15, 2012
  1. Mostly a debug release, one important bug fix:

     * Important bug  fix in EventHandler  - the parameters to  the system
       select command were wrong and resulted in very high CPU usage.  The
       behaviour of consumers didn't seem to be affected by this issue, it
       only caused excessive CPU usage (YMMV)
    
     * Added  support  for incoming  consumer  cancel,  this requires  API
       change  on the \amqphp\Consumer  interface, adding  another handler
       method.   This is  feature  is  required before  HA  queues can  be
       supported.
    
     * Update the Channel API so  that consume parameters can be specified
       in  an option  second parameter  to \amqphp\Channel->addConsumer().
       The  existing   \amqphp\Consumer->getConsumeMethod()  is  still  in
       place, if  2 sets of connection  params are available  for a single
       consumer, the Channel prefers the value from getConsumeMethod
    
     * Improved the Channel consumer acking behaviour to be easier to use.
       The Channel keeps  a record of the basic.consume  params, and skips
       sending  acks  for   consumers  that  have  specified  no-ack=true.
       Previously,  the  user had  to  keep  track  of whether  to  return
       CONSUMER_ACK, CONSUMER_REJECT,  etc, this is no  longer required as
       this function is performed inside the Channel
    
     * Added an "ack buffer" feature  - a new Channel field $ackBuffer can
       be  set  to an  integer,  this causes  the  Channel  to send  fewer
       (n)acks, using the multiple=true flag  to ack more than one message
       at  a time.  This  feature might  be useful  for busy  consumers to
       reduce network overhead, but care  must be taken to ensure that the
       ackBuffer  isn't greater than  the basic.qos  prefetch-count value,
       otherwise  the Channel  goes  in  to a  deadlocked  state.  I  will
       consider adding code to prevent this in future.
    
     * Added client  capabilities to the Consumer  - this data  is sent to
       RabbitMQ.
    
     * Changed the behaviour of the  wire protocol code to always use Amqp
       long strings  in Amqp  tables, even if  the given string  could fit
       inside a  small string.  This  makes dealing with Amqp  tables much
       easier,  as RabbitMQ  doesn't use  short strings  (or seems  to get
       upset by them, anyway).  Amqp tables can now be specified as normal
       assoc arrays.
    
     * A couple of minor wire message formatting fixes and optimisations.
    
     * Lots of  new switches for  the demo consumer and  producer scripts,
       use --help for more info and usage examples.
    
     * Removed all trace of the 'robin' vhost from demo configs.
    
     * Platforms-specific tweaks in the forker demo, this is getting a bit
       long in the tooth now.
    committed Jan 15, 2012
  2. Removed half-backed code

    committed Jan 15, 2012
  3. Rebuilt the generated sources, fixed bugs in the thumper demos. Ready

    to re-merge to master for a new release
    committed Jan 15, 2012
  4. Removed all references to the robin vhost in demos and tests, these

    now all use the default / vhost.
    
    Minor fixes in the demos.
    
    Tweaks to demo text outputs.
    
    More tinkerings  with the forker  demos, these will need  revisting at
    some point.
    committed Jan 15, 2012
Commits on Jan 10, 2012
  1. Fixed hardcodings in the phing remote deploy script

    Set  the ackBuffer  to  0 in  multi-web  demo to  avoid deadlock  with
    prefetch-count
    
    Fixes in Channel when working with PChannels
    
    Removed debug logging code
    committed Jan 10, 2012