Skip to content

Store the Plain Text Group Id instead or in addition to a UUID [INT-2675] #6650

Open

Description

@spring-operator

Gunnar Hillert opened INT-2675 and commented

When operating on the JDBCMessageStore lookups are made by providing the groupId, which calls getKey(Object input) which then calls

UUIDConverter.getUUID(input).toString()

The PointToPointChannelParser parses the MessageStore attribute (message-store) and initializes a MessageGroupQueue. When we initialize the MessageGroupQueue we provid the groupId via its contructor. The groupId is the concatenation of the string representation of the message-store attribute + ":" + channel name.

In the JDBC Message Store, we convert the group id from e.g. "jdbcMessageStore:inputChannel" to an UUID.

As users may need to investigate the tables, this may be cumbersome and s(he) may not have a clue what group key refers to the UUID value in the table.

A side question is how portable (between JVMs) is :

UUID.nameUUIDFromBytes(("jdbcMessageStore:inputChannel").getBytes("UTF-8"))  

Ideally, we should probably store the clear text groupId in the tables, considering:

  • this must not impact efficiency
  • avoid table locking in concurrent access situations

Affects: 2.1.3

This issue is a sub-task of #6647

Issue Links:

Activity

  1. spring-operator commented on Sep 19, 2012

    @spring-operator
    ContributorAuthor

    Gary Russell commented

    see #6735; when this issue is resolved, the lock keys should be optimized.

  2. spring-operator commented on Sep 19, 2012

    @spring-operator
    ContributorAuthor

    Gary Russell commented

    The summary says "...instead of or in addition...". Beware that 'instead of' has other ramifications - the current conversion to a UUID String limits the size to 36 bytes. Using the group id directly causes the 36 CHAR limit to be exceeded in several JUnit tests. If we go the "instead of" route, the column width may need to be increased.

    Caused by: java.sql.SQLException: A truncation error was encountered trying to shrink CHAR 'JdbcMessageStoreChannelIntegrationTests' to length 36.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions