com.taosdata.jdbc.tmq

## Class TMQConnector

- java.lang.Object
- - com.taosdata.jdbc.TSDBJNIConnector
  - - com.taosdata.jdbc.tmq.TMQConnector

    public class TMQConnector
    extends TSDBJNIConnector

### Field Summary

### Fields inherited from class com.taosdata.jdbc.TSDBJNIConnector

`taos`

### Constructor Summary

Constructors
Constructor and Description
`TMQConnector()`

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `asyncCommit(OffsetWaitCallback<?> callback)`
`void` `asyncCommit(String topicName, int vgId, long offset, OffsetWaitCallback<?> callback)`
`void` `closeConsumer()`
`void` `commitOffsetSync(String topicName, int vgId, long offset)`
`long` `committed(String topicName, int vgId)`
`long` `createConfig(Properties properties)`
`void` `createConsumer(long conf)`
`long` `createTopic(Collection<String> topics)`
`void` `destroyConf(long conf)`
`void` `destroyTopic(long topic)`
`int` `fetchBlock(long resultSet, TSDBResultSetBlockData blockData, List<ColumnMetaData> columnMetaData)`
`String` `getDbName(long res)`
`String` `getErrMsg(int code)`
`long` `getOffset(long res)`
`String` `getTableName(long res)`
`List<Assignment>` `getTopicAssignment(String topicName)`
`String` `getTopicName(long res)`
`int` `getVgroupId(long res)`
`long` `poll(long waitTime)`
`long` `position(String topicName, int vgId)`
`void` `seek(String topicName, int vgId, long offset)`
`void` `setTopicList(String[] topics)`
`void` `subscribe(long topic)`
`Set<String>` `subscription()`
`void` `syncCommit()`
`void` `unsubscribe()`

### Methods inherited from class com.taosdata.jdbc.TSDBJNIConnector

`addBatch, bindColumnDataArray, closeBatch, closeConnection, connect, executeBatch, executeQuery, executeQuery, fetchBlock, fetchRow, freeResultSet, getAffectedRows, getErrCode, getErrMsg, getResultTimePrecision, getSchemaMetaData, getTableVGroupID, init, insertLines, insertLinesWithReqId, insertLinesWithTtl, insertLinesWithTtlAndReqId, insertRaw, insertRawWithReqId, insertRawWithTtl, insertRawWithTtlAndReqId, isClosed, isResultsetClosed, isUpdateQuery, prepareStmt, prepareStmt, setBindTableName, setBindTableNameAndTags`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### TMQConnector

    public TMQConnector()

### Method Detail

#### createConfig

    public long createConfig(Properties properties)
                      throws SQLException

Throws:
  `SQLException`

#### destroyConf

    public void destroyConf(long conf)

#### createConsumer

    public void createConsumer(long conf)
                        throws SQLException

Throws:
  `SQLException`

#### createTopic

    public long createTopic(Collection<String> topics)
                     throws SQLException

Throws:
  `SQLException`

#### destroyTopic

    public void destroyTopic(long topic)

#### subscribe

    public void subscribe(long topic)
                   throws SQLException

Throws:
  `SQLException`

#### subscription

    public Set<String> subscription()
                             throws SQLException

Throws:
  `SQLException`

#### setTopicList

    public void setTopicList(String[] topics)

#### syncCommit

    public void syncCommit()
                    throws SQLException

Throws:
  `SQLException`

#### commitOffsetSync

    public void commitOffsetSync(String topicName,
                                 int vgId,
                                 long offset)
                          throws SQLException

Throws:
  `SQLException`

#### asyncCommit

    public void asyncCommit(OffsetWaitCallback<?> callback)

#### asyncCommit

    public void asyncCommit(String topicName,
                            int vgId,
                            long offset,
                            OffsetWaitCallback<?> callback)

#### unsubscribe

    public void unsubscribe()
                     throws SQLException

Throws:
  `SQLException`

#### closeConsumer

    public void closeConsumer()
                       throws SQLException

Throws:
  `SQLException`

#### getErrMsg

    public String getErrMsg(int code)

#### poll

    public long poll(long waitTime)
              throws SQLException

Throws:
  `SQLException`

#### getTopicName

    public String getTopicName(long res)
                        throws SQLException

Throws:
  `SQLException`

#### getDbName

    public String getDbName(long res)
                     throws SQLException

Throws:
  `SQLException`

#### getVgroupId

    public int getVgroupId(long res)
                    throws SQLException

Throws:
  `SQLException`

#### getTableName

    public String getTableName(long res)

#### getOffset

    public long getOffset(long res)
                   throws SQLException

Throws:
  `SQLException`

#### fetchBlock

    public int fetchBlock(long resultSet,
                          TSDBResultSetBlockData blockData,
                          List<ColumnMetaData> columnMetaData)

#### seek

    public void seek(String topicName,
                     int vgId,
                     long offset)

#### getTopicAssignment

    public List<Assignment> getTopicAssignment(String topicName)

#### committed

    public long committed(String topicName,
                          int vgId)
                   throws SQLException

Throws:
  `SQLException`

#### position

    public long position(String topicName,
                         int vgId)
                  throws SQLException

Throws:
  `SQLException`