CosId

Universal, flexible, high-performance distributed ID generator. | 通用、灵活、高性能的分布式 ID 生成器

APACHE-2.0 License

Stars
475
Committers
12

Bot releases are hidden (Show)

CosId - v2.9.8

Published by Ahoo-Wang about 1 month ago

What's Changed

Full Changelog: https://github.com/Ahoo-Wang/CosId/compare/v2.9.6...v2.9.8

CosId - v2.9.6 Latest Release

Published by Ahoo-Wang about 2 months ago

What's Changed

Full Changelog: https://github.com/Ahoo-Wang/CosId/compare/v2.9.5...v2.9.6

CosId - v2.9.5

Published by Ahoo-Wang 2 months ago

What's Changed

New Contributors

Full Changelog: https://github.com/Ahoo-Wang/CosId/compare/v2.9.4...v2.9.5

CosId - v2.9.4

Published by Ahoo-Wang 2 months ago

What's Changed

Full Changelog: https://github.com/Ahoo-Wang/CosId/compare/v2.9.3...v2.9.4

CosId - v2.9.3

Published by Ahoo-Wang 3 months ago

What's Changed

Full Changelog: https://github.com/Ahoo-Wang/CosId/compare/v2.9.2...v2.9.3

CosId - v2.9.2

Published by Ahoo-Wang 3 months ago

What's Changed

Full Changelog: https://github.com/Ahoo-Wang/CosId/compare/v2.9.1...v2.9.2

CosId - v2.9.1

Published by Ahoo-Wang 3 months ago

What's Changed

Full Changelog: https://github.com/Ahoo-Wang/CosId/compare/v2.9.0...v2.9.1

CosId - v1.20.0

Published by Ahoo-Wang 3 months ago

What's Changed

Full Changelog: https://github.com/Ahoo-Wang/CosId/compare/v1.19.3...v1.20.0

CosId - v2.9.0

Published by Ahoo-Wang 4 months ago

What's Changed

Full Changelog: https://github.com/Ahoo-Wang/CosId/compare/v2.8.3...v2.9.0

CosId - v2.8.3

Published by Ahoo-Wang 4 months ago

What's Changed

Full Changelog: https://github.com/Ahoo-Wang/CosId/compare/v2.8.2...v2.8.3

CosId - v2.8.2

Published by Ahoo-Wang 4 months ago

What's Changed

Full Changelog: https://github.com/Ahoo-Wang/CosId/compare/v2.8.1...v2.8.2

CosId - v2.8.1

Published by Ahoo-Wang 5 months ago

What's Changed

YearMonthDayGroupBySupplier

使用 SegmentId 算法,要求输出的ID字符串:

  • 起始序号:0
  • 格式:<prefix><year_month_day><sequence>
  • 分组:按日期分组,序号从0开始。即明天序号需要重置为0.
  • 序号位:8位数值,不足8位前补0
  • 例如:BIZ-240516-00000001
cosid:
  segment:
    enabled: true
    distributor:
      type: redis
    provider:
      group_year_month_day_biz:
        group:
          by: year_month_day
          pattern: yyMMdd
        converter:
          type: to_string
          to-string:
            pad-start: true
            char-size: 8
          prefix: BIZ-
          group-prefix:
            enabled: true

配置信息:

{
  "group_year_month_day_biz": {
    "kind": "StringSegmentId",
    "actual": {
      "kind": "SegmentChainId",
      "fetchTime": 1715911765,
      "maxId": 280,
      "offset": 260,
      "sequence": 260,
      "step": 20,
      "isExpired": false,
      "isOverflow": false,
      "isAvailable": true,
      "groupedKey": {
        "key": "240517",
        "ttlAt": 1715961599
      },
      "converter": {
        "kind": "Radix62IdConverter",
        "radix": 62,
        "charSize": 11,
        "padStart": true,
        "maxId": 9223372036854776000
      }
    },
    "converter": {
      "kind": "PrefixIdConverter",
      "prefix": "BIZ-",
      "actual": {
        "kind": "GroupedPrefixIdConverter",
        "delimiter": "-",
        "actual": {
          "kind": "ToStringIdConverter",
          "padStart": true,
          "charSize": 8
        }
      }
    }
  }
}

Full Changelog: https://github.com/Ahoo-Wang/CosId/compare/v2.8.0...v2.8.1

CosId - v2.8.0

Published by Ahoo-Wang 5 months ago

What's Changed

YearGroupBySupplier

使用 SegmentId 算法,要求输出的ID字符串:

  • 起始序号:0
  • 格式:<prefix><year><sequence>
  • 分组:按年分组,每年序号从0开始。即每年序号需要重置为0.
  • 序号位:8位数值,不足8位前补0
  • 例如:BIZ-2024-00000231
cosid:
  segment:
    enabled: true
    distributor:
      type: redis
    provider:
      group_year_biz:
        group:
          by: year
          pattern: yyyy
        converter:
          type: to_string
          to-string:
            pad-start: true
            char-size: 8
          prefix: BIZ-
          group-prefix:
            enabled: true

YearMonthGroupBySupplier

使用 SegmentId 算法,要求输出的ID字符串:

  • 起始序号:0
  • 格式:<prefix><year_month><sequence>
  • 分组:按年月分组,序号从0开始。即跨月序号需要重置为0.
  • 序号位:8位数值,不足8位前补0
  • 例如:BIZ-240516-00000061
cosid:
  segment:
    enabled: true
    distributor:
      type: redis
    provider:
      group_year_month_biz:
        group:
          by: year_month
          pattern: yyyyMM
        converter:
          type: to_string
          to-string:
            pad-start: true
            char-size: 8
          prefix: BIZ-
          group-prefix:
            enabled: true

YearMonthDayGroupBySupplier

使用 SegmentId 算法,要求输出的ID字符串:

  • 起始序号:0
  • 格式:<prefix><year_month_day><sequence>
  • 分组:按日期分组,序号从0开始。即明天序号需要重置为0.
  • 序号位:8位数值,不足8位前补0
  • 例如:BIZ-240516-00000001
cosid:
  segment:
    enabled: true
    distributor:
      type: redis
    provider:
      group_year_month_day_biz:
        group:
          by: year_month_day
          pattern: yyMMdd
        converter:
          type: to_string
          to-string:
            pad-start: true
            char-size: 8
          prefix: BIZ-
          group-prefix:
            enabled: true

Full Changelog: https://github.com/Ahoo-Wang/CosId/compare/v2.6.9...v2.8.0

CosId - v2.6.9

Published by Ahoo-Wang 5 months ago

What's Changed

Full Changelog: https://github.com/Ahoo-Wang/CosId/compare/v2.6.8...v2.6.9

CosId - v2.6.8

Published by Ahoo-Wang 7 months ago

What's Changed

Full Changelog: https://github.com/Ahoo-Wang/CosId/compare/v2.6.6...v2.6.8

CosId - v2.6.6

Published by Ahoo-Wang 8 months ago

What's Changed

Full Changelog: https://github.com/Ahoo-Wang/CosId/compare/v2.6.5...v2.6.6

CosId - v2.6.5

Published by Ahoo-Wang 9 months ago

What's Changed

Full Changelog: https://github.com/Ahoo-Wang/CosId/compare/v2.6.4...v2.6.5

CosId - v2.6.4

Published by Ahoo-Wang 10 months ago

What's Changed

Full Changelog: https://github.com/Ahoo-Wang/CosId/compare/v2.6.2...v2.6.4

CosId - v2.6.2

Published by Ahoo-Wang 11 months ago

What's Changed

Full Changelog: https://github.com/Ahoo-Wang/CosId/compare/v2.6.0...v2.6.2

CosId - v2.6.0

Published by Ahoo-Wang 11 months ago

What's Changed

Full Changelog: https://github.com/Ahoo-Wang/CosId/compare/v2.5.6...v2.6.0