#include "os.h"
static int msgCount = 0;
{
}
void
{
}
static void
{
}
{
printf ( "Received message:\n" );
printf ( "\n" );
msgCount++;
printf ( "Acknowledging message Id: %lld.\n", msgId );
}
}
int
main ( int argc, char *argv[] )
{
const char *sessionProps[20];
int propIndex;
const char *flowProps[20];
const char *provProps[20];
int provIndex;
char qNN[80];
if ( argc < 5 ) {
printf ( "Usage: HelloWorldQueueSub <msg_backbone_ip:port> <vpn> <client-username> <queue>\n" );
return -1;
}
&context_p, &contextFuncInfo, sizeof ( contextFuncInfo ) );
propIndex = 0;
sessionProps[propIndex++] = argv[1];
sessionProps[propIndex++] = argv[2];
sessionProps[propIndex++] = argv[3];
sessionProps[propIndex++] = NULL;
context_p,
&session_p, &sessionFuncInfo, sizeof ( sessionFuncInfo ) );
printf ( "Connected.\n" );
provIndex = 0;
provProps[provIndex++] = argv[4];
provProps[provIndex++] = "100";
provProps[provIndex++] = NULL;
printf ( "Endpoint management not supported on this appliance.\n" );
return -1;
}
session_p,
NULL, qNN, sizeof ( qNN ) );
propIndex = 0;
flowProps[propIndex++] = argv[4];
flowProps[propIndex++] = NULL;
session_p,
&flow_p, &flowFuncInfo, sizeof ( flowFuncInfo ) );
printf ( "Waiting for messages......\n" );
fflush ( stdout );
while ( msgCount < 1 ) {
SLEEP ( 1 );
}
printf ( "Exiting.\n" );
return 0;
}