185
ctx context.Context,
186
request *persistence.InternalCreateQueueRequest,
187
>
) (*persistence.InternalCreateQueueResponse, error) {
queue_v2.go
188
>
payload := persistencespb.Queue{
189
>
Partitions: map[int32]*persistencespb.QueuePartition{
190
>
defaultPartition: {
191
>
MinMessageId: persistence.FirstQueueMessageID,
192
>
},
193
>
},
194
>
}
195
>
bytes, _ := payload.Marshal()
196
>
row := sqlplugin.QueueV2MetadataRow{
197
>
QueueType: request.QueueType,
198
>
QueueName: request.QueueName,
199
>
MetadataPayload: bytes,
200
>
MetadataEncoding: enumspb.ENCODING_TYPE_PROTO3.String(),
201
>
}
202
>
_, err := q.DB.InsertIntoQueueV2Metadata(ctx, &row)
203
>
if q.DB.IsDupEntryError(err) {
204
return nil, fmt.Errorf(
205
"%w: queue type %v and name %v",