The embodiment of the invention relates to a method and a device for
processing message, wherein the method comprises: receiving the message and storing the message into a buffer memory unit; determining a buffer memory
queue corresponding to the message; judging whether the sum of the length of the message and the actual
queue length of the buffer memory
queue is less than or equal to the queue allocation length in the buffer memory queue; if so, adding the message to the buffer memory queue by updating the content of a buffer memory item message pointer in the buffer memory
list of the buffer memory queue as the starting
memory address of the buffer memory unit containing the message; and updating the buffer memory item index and the queue enqueueing index in the buffer memory
list to establish the new index for the message; and updating the
actual length of the queue length into the
actual length after the message is memorized. The embodiment of the invention provides a method for dynamically adjusting the buffer
memory bandwidth of the queue, in the method, the
massage is stored in the buffer memory of the queue by judging sum of the length of the
massage and the actual lengthof the buffer memory of the queue as well as the configurated length of the queue in the buffer memory of the queue; and the buffer memory of the queue is changed according to the change of the chainwidth so as to improve the problems of the
transmission delay because of overlarge buffer memory space and the shaking
packet loss because of over-small buffer memory space of the queue and enhance the
communication quality.