This project is read-only.

publish-string


   

SYNOPSIS


    Publishes a string to a RabbitMQ exchange.
   

SYNTAX


    publish-string [-message] <String> [-hostname] <String> [-exchange] <String> [-routingkey] <String>
       [[-protocol] <String>] [[-exchangetype] <String>] [[-virtualhost] <String>] [[-username] <String>] [[-password] <SecureString>]
       [[-encoding] <String>] [<CommonParameters>]
      
   

DESCRIPTION


    The publish-string cmdlet publishes messages to a RabbitMQ
    exchange.

PARAMETERS


    -message <String>
        The message to publish.
       
        Required?                    true
        Position?                    1
        Default value               
        Accept pipeline input?       true (ByValue, ByPropertyName)
        Accept wildcard characters? 
       
    -hostname <String>
        Specifies the RabbitMQ server to which to connect.
       
        Required?                    true
        Position?                    2
        Default value               
        Accept pipeline input?       true (ByPropertyName)
        Accept wildcard characters? 
       
    -exchange <String>
        The name of the exchange to use for messaging.
       
        Required?                    true
        Position?                    3
        Default value               
        Accept pipeline input?       true (ByPropertyName)
        Accept wildcard characters? 
       
    -routingkey <String>
        The routing key to match.
       
        Required?                    true
        Position?                    4
        Default value               
        Accept pipeline input?       true (ByPropertyName)
        Accept wildcard characters? 
       
    -protocol <String>
        The AMQP protocol support moniker to use when connecting
        to the RabbitMQ server.  See get-protocol for a complete list.
       
        Required?                    false
        Position?                    5
        Default value               
        Accept pipeline input?       true (ByPropertyName)
        Accept wildcard characters? 
       
    -exchangetype <String>
        Specifies the type of the exchange.  See get-exchangeType
        for a complete list.
       
        Required?                    false
        Position?                    6
        Default value               
        Accept pipeline input?       true (ByPropertyName)
        Accept wildcard characters? 
       
    -virtualhost <String>
        The name of the RabbitMQ virtual host to which to connect.
       
        Required?                    false
        Position?                    7
        Default value               
        Accept pipeline input?       true (ByPropertyName)
        Accept wildcard characters? 
       
    -username <String>
        The username to use for authenticating the RabbitMQ connection.
       
        Required?                    false
        Position?                    8
        Default value               
        Accept pipeline input?       true (ByPropertyName)
        Accept wildcard characters? 
       
    -password <SecureString>
        The password to use for authenticating the RabbitMQ connection.
       
        Required?                    false
        Position?                    9
        Default value               
        Accept pipeline input?       true (ByPropertyName)
        Accept wildcard characters? 
       
    -encoding <String>
        The encoding to use when translating the message body into a string.
       
        Required?                    false
        Position?                    10
        Default value               
        Accept pipeline input?       true (ByPropertyName)
        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


    None.
   
   

OUTPUTS


    System.Collections.Hashtable.  The splatted argument hashtable with
    unspecified arguments removed.
   
   

NOTES


   
   
        The string is packaged into a binary structure using the encoding type
        specified.
       
       
        AMQP Defaults
        -------------
       
        By default connections are made using the AMPQ_8_0
        protocol set.
       
        By default exchanges are declared as topic exchanges. 
        They are also declared non-passive, non-durable,
        non-autodelete, and non-internal.
   
    -------------------------- EXAMPLE 1 --------------------------
   
    C:\PS>publish-string -hostname RbtSvr -exchange ps -routingkey 't.x' -message 'this is my message'
   
   
    Description
    -----------
    This example publishes a single message.
   
   
   
   
   
    -------------------------- EXAMPLE 2 --------------------------
   
    C:\PS>gc msgs.txt | publish-string -hostname RbtSvr -exchange ps -routingkey 't.x'
   
   
    Description
    -----------
    This example publishes each line of text in the file msgs.txt as a
    unique message.
   
   
   
   
   
   
RELATED LINKS
    RabbitMQ general documentation: http://www.rabbitmq.com/documentation.html
    Exchanges: http://www.rabbitmq.com/faq.html#managing-concepts-exchanges
    get-protocol
    get-exchangeType
    receive-consumer
    start-consumer
    stop-consumer
    wait-consumer

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

Comments

No comments yet.