receive-consumer


   

SYNOPSIS


    Gets messages received by a RabbitMQ consumer.
   

SYNTAX


    receive-consumer [-name] <String> [-keep] [<CommonParameters>]
   
   

DESCRIPTION


    The receive-consumer cmdlet returns any messages dequeued by the consumer
    since the previous call to receive-consumer or wait-event.

PARAMETERS


    -name <String>
        The name of the consumer on which to wait.
       
        Required?                    true
        Position?                    1
        Default value               
        Accept pipeline input?       true (ByPropertyName)
        Accept wildcard characters? 
       
    -keep [<SwitchParameter>]
        Prevents messages from being removed from the consumer buffer.
       
        Required?                    false
        Position?                    named
        Default value               
        Accept pipeline input?       false
        Accept wildcard characters? 
       
    <CommonParameters>
        This cmdlet supports the common parameters: Verbose, Debug,
        ErrorAction, ErrorVariable, WarningAction, WarningVariable,
        OutBuffer and OutVariable. For more information, type,
        "get-help about_commonparameters".
   

INPUTS


    The consumer instance from which to receive dequeued messages.
   
   

OUTPUTS


    RabbitMQ.Client.Events.BasicDeliverEventArgs[]. All messages received from
    the consumer since the previous call to receive-consumer or wait-event, or
    $null if no message has been dequeued.
   
   

NOTES


   
   
        Messages and BasicAck
        ---------------------
        Messages are available during the current PowerShell session and
        are discarded one the session ends.  Because the queues created
        by start-consumer use auto-acknowledge, messages are considered
        acknowledged once the consumer dequeues them.  Any message dequeued
        by the consumer that is not retrieved using wait-consumer or
        receive-consumer will not be requeued in the RabbitMQ server.
   
    -------------------------- EXAMPLE 1 --------------------------
   
    C:\PS>$q = start-consumer -hostname RbtSvr -exchange ps -routingkey 't.?'
    C:\PS> $q | receive-consumer
   
   
    Description
    -----------
    This example displays all events buffered by the consumer.
   
   
   
   
   
   

RELATED LINKS


    RabbitMQ general documentation: http://www.rabbitmq.com/documentation.html
    BasicDeliverEventArgs: http://bit.ly/aQq4yw
    start-consumer
    stop-consumer
    wait-consumer

Last edited Nov 22, 2010 at 2:17 AM by beefarino, version 2

Comments

No comments yet.