This chapter contains an overview of CRTL specific data types and constants.

CRTL Data Types

The CRTL specific data types are defined in the mq_datatypes.h file. This is done in order to make the communication format of the C client compliant with the Java based FioranoMQ server.
The most common data types used in CRTL are mqbyte, mqchar, mqshort, mqint, mqlong, mqfloat, mqdouble, mqstring, and mqbyteArray.
It is necessary to use these data types when programming with CRTL because of the difference in sizes of the corresponding data types in Java. The sizes of these data types are specified in the following table:

Data Type



8 bits (unsigned)


8 bits


16 bits


32 bits


64 bits


32 bits


64 bits

TABLE 2-1 Size of Data Types
The mqstring and mqbyteArray are defined as pointers to mqchar and mqbyte, respectively.
Apart from these basic data types, there is another important data type defined in CRTL "mqobject". It is defined to be (void *). Certain functions, which can return different types of objects, returns an mqobject and it is the responsibility of the user to use the object in a suitable manne
It is also recommended to type cast the mqobject into an appropriate type, before using it.
The mqchar is defined to occupy only 8 bits and not 16 bits (as in Java), so that it is convenient to manage it in the user code. h1.CRTL Constants
All the important public macros that are used in the CRTL are defined in the following header files:
It is recommended to use these constants instead of using the corresponding values to avoid any complexities.

Lookup Related Constants

Following are the permissible variable names and values in the InitialContext environment. This environment is used to create a new InitialContext, which in turn is used for looking up administered object from the FioranoMQ server.
Permissible names for the required variables:

  • Username for accessing the admin store


  • Password for the above mentioned username


  • URL or location of the admin store (FioranoMQ server in this case)


  • Protocol over which the C clients would communicate with the FioranoMQ server

Following are the permissible values for Transport protocol:l

  • #define TCP_PROTOCOL "TCP"
  • #define HTTP_PROTOCOL "HTTP"
  • #define SSL_PROTOCOL "SSL"

Following are the names of different variables that are used for client-server communication over HTTP protocol:

  • URL of the HTTP proxy server through which the HTTP connections have to be routed


  • The type of HTTP Proxy server being used between FioranoMQ client and server


  • The authentication realms (if any) being used on the HTTP proxy server


  • Username to pass through the HTTP Proxy server


  • Password for the above mentioned username


  • Variable for forcing HTTP 1.0 connections

#defineFORCE_HTTP_10 "FORCE_HTTP_10"
Following are names of different variables that are required for FioranoMQ client-server communication over SSL protocol:

  • Fully qualified path with name of the SSL certificate file


  • Fully qualified path with name of the SSL private key file


  • Password for the SSL private key


Messaging Related Constants

Messaging related constants are required while creating sessions and sending messages to a queue or topic on the FioranoMQ server.
Following are the possible values of the acknowledgement mode that can be used while creating a TopicSession or a QueueSession:

  • #define AUTO_ACKNOWLEDGE 1

Following are the permissible values for the message delivery mode that can be used in publish or send call. The persistence of a message is decided using these constants:

  • #define NON_PERSISTENT 1
  • #define PERSISTENT 2

Following are the string representations of the various message types that can be sent by a C client to the FioranoMQ server. A call of Msg_getJMSType returns one of these values:

  • #define JMSMESSAGE "Message"
  • #define BYTESMESSAGE "BytesMessage"
  • #define STREAMMESSAGE "StreamMessage"
  • #define MAPMESSAGE "MapMessage"
  • #define TEXTMESSAGE "TextMessage"

Following are some of the permissible values for message priority that can be used in publish or send call:

  • #define MinPriority 0
  • #define MaxPriority 9
  • #define LowPriority 0
  • #define NormPriority 4
  • #define HighPriority 9
Adaptavist ThemeBuilder EngineAtlassian Confluence