Dispatcher has no subscribers for channel排坑指南

通过Spring Cloud Stream解耦具体消息中间件,屏蔽掉不同中间件之间的差异,简化了消息中间件使用难度,便于切换不同的消息队列。带来这些便利的同时,也引入了不少问题,本文从源码角度结合实际使用场景分析异常Dispatcher has no subscribers for channel产生的原因以及解决方案

原因分析

由报错信息可知,产生报错的位置在UnicastingDispatcher类的doDispatch方法,此方法是由MessageChannel的send方法调用的。从代码分析可知doDispatch方法会获取消息对应的处理器,如果没有处理器处理消息,则会报Dispatcher has no subscribers。接下来我们需要去找初始化消息处理器的地方

private boolean doDispatch(Message<?> message) {if (tryOptimizedDispatch(message)) {return true;}boolean success = false;// 获取消息对应的处理器Iterator<MessageHandler> handlerIterator = this.getHandlerIterator(message);// 如果没有对应的处理器报错if (!handlerIterator.hasNext()) {throw new MessageDispatchingException(message, "Dispatcher has no subscribers");}List<RuntimeException> exceptions = new ArrayList<RuntimeException>();while (!success && handlerIterator.hasNext()) {MessageHandler handler = handlerIterator.next();try {handler.handleMessage(message);success = true; // we have a winner.}catch (Exception e) {@SuppressWarnings("deprecation")RuntimeException runtimeException = wrapExceptionIfNecessary(message, e);exceptions.add(runtimeException);this.handleExceptions(exceptions, message, !handlerIterator.hasNext());}}return success;
}

我们知道报错的原因是没有拿到消息的处理器,我们看一下getHandlerIterator方法获取处理器的逻辑。该方法会从this.getHandlers()获取处理器

private Iterator<MessageHandler> getHandlerIterator(Message<?> message) {if (this.loadBalancingStrategy != null) {return this.loadBalancingStrategy.getHandlerIterator(message, this.getHandlers());}return this.getHandlers().iterator();
}

查看getHandlers方法可知其获取的处理器其实是从OrderedAwareCopyOnWriteArraySet类型的属性handlers获取的,handlers的值是通过addHandler方法设置

protected Set<MessageHandler> getHandlers() {return this.handlers.asUnmodifiableSet();
}private final OrderedAwareCopyOnWriteArraySet<MessageHandler> handlers =new OrderedAwareCopyOnWriteArraySet<MessageHandler>();public synchronized boolean addHandler(MessageHandler handler) {Assert.notNull(handler, "handler must not be null");Assert.isTrue(this.handlers.size() < this.maxSubscribers, "Maximum subscribers exceeded");boolean added = this.handlers.add(handler);if (this.handlers.size() == 1) {this.theOneHandler = handler;}else {this.theOneHandler = null;}return added;
}

AbstractSubscribableChannel类的subscribe方法有调用addHandler方法,而subscribe方法调用的地方有很多,我们可以看到AbstractMessageChannelBinder类的doBindProducer方法中有去调用subscribe设置处理处理器。而doBindProducer实际工作就是在初始化发送消息的通道及绑定通道到对应消息中间件等事情

@Override
public boolean subscribe(MessageHandler handler) {MessageDispatcher dispatcher = getRequiredDispatcher();// 调用addHandler添加处理消息方法boolean added = dispatcher.addHandler(handler);adjustCounterIfNecessary(dispatcher, added ? 1 : 0);return added;
}public final Binding<MessageChannel> doBindProducer(final String destination, MessageChannel outputChannel,final P producerProperties) throws BinderException {Assert.isInstanceOf(SubscribableChannel.class, outputChannel,"Binding is supported only for SubscribableChannel instances");final MessageHandler producerMessageHandler;final ProducerDestination producerDestination;try {producerDestination = this.provisioningProvider.provisionProducerDestination(destination,producerProperties);SubscribableChannel errorChannel = producerProperties.isErrorChannelEnabled()? registerErrorInfrastructure(producerDestination) : null;producerMessageHandler = createProducerMessageHandler(producerDestination, producerProperties,errorChannel);if (producerMessageHandler instanceof InitializingBean) {((InitializingBean) producerMessageHandler).afterPropertiesSet();}}catch (Exception e) {if (e instanceof BinderException) {throw (BinderException) e;}else if (e instanceof ProvisioningException) {throw (ProvisioningException) e;}else {throw new BinderException("Exception thrown while building outbound endpoint", e);}}if (producerMessageHandler instanceof Lifecycle) {((Lifecycle) producerMessageHandler).start();}postProcessOutputChannel(outputChannel, producerProperties);// 调用subscribe方法设置处理器((SubscribableChannel) outputChannel).subscribe(new SendingHandler(producerMessageHandler, HeaderMode.embeddedHeaders.equals(producerProperties.getHeaderMode()), this.headersToEmbed,producerProperties.isUseNativeEncoding()));Binding<MessageChannel> binding = new DefaultBinding<MessageChannel>(destination, null, outputChannel,producerMessageHandler instanceof Lifecycle ? (Lifecycle) producerMessageHandler : null) {@Overridepublic Map<String, Object> getExtendedInfo() {return doGetExtendedInfo(destination, producerProperties);}@Overridepublic void afterUnbind() {try {destroyErrorInfrastructure(producerDestination);if (producerMessageHandler instanceof DisposableBean) {((DisposableBean) producerMessageHandler).destroy();}}catch (Exception e) {AbstractMessageChannelBinder.this.logger.error("Exception thrown while unbinding " + toString(), e);}afterUnbindProducer(producerDestination, producerProperties);}};doPublishEvent(new BindingCreatedEvent(binding));return binding;
}

查看doBindProducer方法的调用方法,可以知道BindingService的bindProducer方法调用了doBindProducer

public <T> Binding<T> bindProducer(T output, String outputName) {String bindingTarget = this.bindingServiceProperties.getBindingDestination(outputName);Binder<T, ?, ProducerProperties> binder = (Binder<T, ?, ProducerProperties>) getBinder(outputName, output.getClass());ProducerProperties producerProperties = this.bindingServiceProperties.getProducerProperties(outputName);if (binder instanceof ExtendedPropertiesBinder) {Object extension = ((ExtendedPropertiesBinder) binder).getExtendedProducerProperties(outputName);ExtendedProducerProperties extendedProducerProperties = new ExtendedProducerProperties<>(extension);BeanUtils.copyProperties(producerProperties, extendedProducerProperties);producerProperties = extendedProducerProperties;}validate(producerProperties);// 调用doBindProducer方法Binding<T> binding = doBindProducer(output, bindingTarget, binder, producerProperties);this.producerBindings.put(outputName, binding);return binding;
}

继续追踪可以发现BinderAwareChannelResolver类的resolveDestination方法调用了bindProducer,该方法通过channelName从容器中获取发送消息的通道,如果不存在则根据通道名绑定的信息构建消息发送通道并关联上具体的消息中间件。resolveDestination方法返回的消息输出通道就可以直接用于发送消息。调用返回的MessageChannel的send方法,就可以完成消息的发送,也正是在这个send方法中抛出的Dispatcher has no subscribers

// 调用BinderAwareChannelResolver类的resolveDestination方法,获取MessageChannel对象并调用send方法发送消息
resolver.resolveDestination(channelName).send(MessageBuilder.createMessage(dataWrapper, messageHeaders), timeout);public MessageChannel resolveDestination(String channelName) {try {// 更具通道名获取发送消息通道return super.resolveDestination(channelName);}catch (DestinationResolutionException e) {// intentionally empty; will check again while holding the monitor}// 如果发送消息通道不存在则创建。多线程可能会导致异常synchronized (this) {BindingServiceProperties bindingServiceProperties = this.bindingService.getBindingServiceProperties();String[] dynamicDestinations = bindingServiceProperties.getDynamicDestinations();boolean dynamicAllowed = ObjectUtils.isEmpty(dynamicDestinations) || ObjectUtils.containsElement(dynamicDestinations, channelName);try {return super.resolveDestination(channelName);}catch (DestinationResolutionException e) {if (!dynamicAllowed) {throw e;}}MessageChannel channel = this.bindingTargetFactory.createOutput(channelName);this.beanFactory.registerSingleton(channelName, channel);this.instrumentChannelWithGlobalInterceptors(channel, channelName);channel = (MessageChannel) this.beanFactory.initializeBean(channel, channelName);if (this.newBindingCallback != null) {ProducerProperties producerProperties = bindingServiceProperties.getProducerProperties(channelName);Object extendedProducerProperties = this.bindingService.getExtendedProducerProperties(channel, channelName);this.newBindingCallback.configure(channelName, channel, producerProperties, extendedProducerProperties);bindingServiceProperties.updateProducerProperties(channelName, producerProperties);}Binding<MessageChannel> binding = this.bindingService.bindProducer(channel, channelName);this.dynamicDestinationsBindable.addOutputBinding(channelName, binding);return channel;}
}

由上述代码分析可知,在resolveDestination方法进行MessageChannel初始化时,如果在doBindProducer方法调用((SubscribableChannel) outputChannel).subscribe(…)方法之前遇到异常将无法完成消息处理方法的注册,将会导致在之后send方法中获取不到消息的处理器导致抛出Dispatcher has no subscribers。那在resolveDestination方法中抛出的异常都将会是导致之后send方法抛出Dispatcher has no subscribers异常的原因

原因一:Failed to register bean with name ‘" + name + "’, since bean with the same name already exists…

Failed to register bean with name ‘" + name + "’, since bean with the same name already exists…错误就是resolveDestination方法进行MessageChannel初始化时可能出现的异常。该异常的抛出点在AbstractMessageChannelBinder的registerComponentWithBeanFactory方法。该方法判断上下文中是否已经包含指定名称的bean,如果包含就会抛出上述异常

private void registerComponentWithBeanFactory(String name, Object component) {if (getApplicationContext().getBeanFactory().containsBean(name)) {throw new IllegalStateException("Failed to register bean with name '" + name + "', since bean with the same name already exists. Possible reason: "+ "You may have multiple bindings with the same 'destination' and 'group' name (consumer side) "+ "and multiple bindings with the same 'destination' name (producer side). Solution: ensure each binding uses different group name (consumer side) "+ "or 'destination' name (producer side)." );}else {getApplicationContext().getBeanFactory().registerSingleton(name, component);}
}

查看registerComponentWithBeanFactory调用链可知AbstractMessageChannelBinder的registerErrorInfrastructure方法在进行调用,该方法在注册错误通道,错误通道的命名为destination.getName() + “.errors”,errorBridgeHandlerName的命名为destination.getName() + “.errors” + “.bridge”。在注错误通道或者errorBridge时都会调用registerComponentWithBeanFactory方法,传入错误通道名或errorBridgeHandlerName。由错误通道名、errorBridgeHandlerName的命名规则可知,如果两个不同通道对应同一个destination(对于Kafka就是topic),第一个通道完成初始化后第二个通道再初始化时,由于两个通道destination相同,第二个通道初始化时将会抛出上述异常。更近一步由于resolveDestination在初始化输出通道时并非线程安全,如果多个线程同时调用resolveDestination方法,第一个线程进入synchronized代码块,但还没有完成输出通道注册,之后的线程在上下文无法通过输出通道名获取bean,也会等待进入synchronized代码块的初始化输出通道逻辑。当第一个线程初始化输出通道逻辑结束,第二个线程进入synchronized代码块执行初始化输出通道逻辑,由于已经初始化完成,则在创建错误通道时会报上述异常,之后进入synchronized代码块的相同输出通道的线程都会报这个异常

private SubscribableChannel registerErrorInfrastructure(ProducerDestination destination) {ConfigurableListableBeanFactory beanFactory = getApplicationContext().getBeanFactory();// 获取错误通道名String errorChannelName = errorsBaseName(destination);SubscribableChannel errorChannel = null;if (getApplicationContext().containsBean(errorChannelName)) {Object errorChannelObject = getApplicationContext().getBean(errorChannelName);if (!(errorChannelObject instanceof SubscribableChannel)) {throw new IllegalStateException("Error channel '" + errorChannelName + "' must be a SubscribableChannel");}errorChannel = (SubscribableChannel) errorChannelObject;}else {errorChannel = new PublishSubscribeChannel();this.registerComponentWithBeanFactory(errorChannelName, errorChannel);errorChannel = (PublishSubscribeChannel) beanFactory.initializeBean(errorChannel, errorChannelName);}MessageChannel defaultErrorChannel = null;if (getApplicationContext().containsBean(IntegrationContextUtils.ERROR_CHANNEL_BEAN_NAME)) {defaultErrorChannel = getApplicationContext().getBean(IntegrationContextUtils.ERROR_CHANNEL_BEAN_NAME,MessageChannel.class);}if (defaultErrorChannel != null) {BridgeHandler errorBridge = new BridgeHandler();errorBridge.setOutputChannel(defaultErrorChannel);errorChannel.subscribe(errorBridge);// 获取errorBridgeHandlerNameString errorBridgeHandlerName = getErrorBridgeName(destination);this.registerComponentWithBeanFactory(errorBridgeHandlerName, errorBridge);beanFactory.initializeBean(errorBridge, errorBridgeHandlerName);}return errorChannel;
}// 错误通道名生成规则
protected String errorsBaseName(ProducerDestination destination) {return destination.getName() + ".errors";
}// errorBridgeHandlerName生成规则
protected String getErrorBridgeName(ProducerDestination destination) {return errorsBaseName(destination) + ".bridge";
}

原因二:"The number of expected partitions was: " + partitionCount + ", but " + partitionSize + (partitionSize > 1 ? " have " : " has ") + “been found instead.”…

"The number of expected partitions was: " + partitionCount + ", but " + partitionSize + (partitionSize > 1 ? " have " : " has ") + “been found instead.”…异常在KafkaTopicProvisioner类的createTopicAndPartitions方法中抛出。该方法判断如果传入的分区数大于实际分区数,并且没有设置自动增加分区数及isAutoRebalanceEnabled设置为false将抛出上述异常

private void createTopicAndPartitions(AdminClient adminClient, final String topicName, final int partitionCount,boolean tolerateLowerPartitionsOnBroker, KafkaAdminProperties adminProperties) throws Throwable {ListTopicsResult listTopicsResult = adminClient.listTopics();KafkaFuture<Set<String>> namesFutures = listTopicsResult.names();Set<String> names = namesFutures.get(operationTimeout, TimeUnit.SECONDS);if (names.contains(topicName)) {// only consider minPartitionCount for resizing if autoAddPartitions is true// 有效的分区数int effectivePartitionCount = this.configurationProperties.isAutoAddPartitions()? Math.max(this.configurationProperties.getMinPartitionCount(), partitionCount): partitionCount;DescribeTopicsResult describeTopicsResult = adminClient.describeTopics(Collections.singletonList(topicName));KafkaFuture<Map<String, TopicDescription>> topicDescriptionsFuture = describeTopicsResult.all();Map<String, TopicDescription> topicDescriptions = topicDescriptionsFuture.get(operationTimeout, TimeUnit.SECONDS);TopicDescription topicDescription = topicDescriptions.get(topicName);// 实际分区数int partitionSize = topicDescription.partitions().size();// 实际分区数是否小于有效分区数if (partitionSize < effectivePartitionCount) {// 判断是否运行自动添加分区数if (this.configurationProperties.isAutoAddPartitions()) {CreatePartitionsResult partitions = adminClient.createPartitions(Collections.singletonMap(topicName, NewPartitions.increaseTo(effectivePartitionCount)));partitions.all().get(operationTimeout, TimeUnit.SECONDS);}// 判断是否允许更低的分区数else if (tolerateLowerPartitionsOnBroker) {logger.warn("The number of expected partitions was: " + partitionCount + ", but "+ partitionSize + (partitionSize > 1 ? " have " : " has ") + "been found instead."+ "There will be " + (effectivePartitionCount - partitionSize) + " idle consumers");}else {throw new ProvisioningException("The number of expected partitions was: " + partitionCount + ", but "+ partitionSize + (partitionSize > 1 ? " have " : " has ") + "been found instead."+ "Consider either increasing the partition count of the topic or enabling " +"`autoAddPartitions`");}}}else {// always consider minPartitionCount for topic creationfinal int effectivePartitionCount = Math.max(this.configurationProperties.getMinPartitionCount(),partitionCount);this.metadataRetryOperations.execute(context -> {NewTopic newTopic;Map<Integer, List<Integer>> replicasAssignments = adminProperties.getReplicasAssignments();if (replicasAssignments != null &&  replicasAssignments.size() > 0) {newTopic = new NewTopic(topicName, adminProperties.getReplicasAssignments());}else {newTopic = new NewTopic(topicName, effectivePartitionCount,adminProperties.getReplicationFactor() != null? adminProperties.getReplicationFactor(): configurationProperties.getReplicationFactor());}if (adminProperties.getConfiguration().size() > 0) {newTopic.configs(adminProperties.getConfiguration());}CreateTopicsResult createTopicsResult = adminClient.createTopics(Collections.singletonList(newTopic));try {createTopicsResult.all().get(operationTimeout, TimeUnit.SECONDS);}catch (Exception e) {if (e instanceof ExecutionException) {String exceptionMessage = e.getMessage();if (exceptionMessage.contains("org.apache.kafka.common.errors.TopicExistsException")) {if (logger.isWarnEnabled()) {logger.warn("Attempt to create topic: " + topicName + ". Topic already exists.");}}else {logger.error("Failed to create topics", e.getCause());throw e.getCause();}}else {logger.error("Failed to create topics", e.getCause());throw e.getCause();}}return null;});}
}

在实际使用中,如果我们想要指定发送分区的策略,需要设置分区的大小,并且需要大于1。但如果我们设置分区的大小大于实际的大小,并且没有其它配置,有可能会报出上述错误.由于createTopicAndPartitions方法也是在resolveDestination初始化输出通道时执行,因此此异常抛出后会紧接着抛出Dispatcher has no subscribers for channel…异常

ProducerProperties producerProperties = new ProducerProperties();
producerProperties.setPartitionKeyExpression(new SpelExpressionParser().parseExpression("payload.tenantId"));
producerProperties.setPartitionCount(2);
eventSender.fireEvent(EventSenderConfig.newBuilder().tenantId(0L).eventCode("HALT_TARGET_1").category("HALT_TARGET_1").producerProperties(producerProperties).data(alertRoute).builder()

实际使用案例及解决方案

通过上面原因的分析以及结合具体报错分析可知,Dispatcher has no subscribers for channel…异常只是结果,真正触发抛出此异常的原因需要看resolveDestination初始化时抛出的异常,此异常通常在Dispatcher has no subscribers for channel…异常的前面抛出,并且基本都挨在一起。因此遇到Dispatcher has no subscribers for channel…异常可以往前翻翻,找到具体报错原因,具体问题具体分析

场景一:通过事件服务发送消息,不同事件关联同一个topic

在调用EventSender方法的fireEvent方法发送消息时,如果两个不同eventCode的两个事件,它们都指定了topic,并且topic还相同,在同一个服务下,当第一个事件先发送消息,第二个事件后发送消息,第二个发送消息的事件将报错

AlertRoute alertRoute = new AlertRoute();
alertRoute.setAlertRouteId(1L);
eventSender.fireEvent(EventSenderConfig.newBuilder().tenantId(0L).eventCode("HALT_TARGET_1").category("HALT_TARGET_1").data(alertRoute).builder(), message -> {System.out.println("======message=====Headers " + message.getHeaders() + "================");System.out.println("======message=====Payload " + message.getPayload() + "================");});eventSender.fireEvent(CustomTopicSenderConfig.newBuilder().topic("halt-target-test-13").channelName("halt-target-test-11010").data(alertRoute).eventSourceCode("hzero-kafaka").tenantId(0L).builder(), message -> {System.out.println("======message=====Headers " + message.getHeaders() + "================");System.out.println("======message=====Payload " + message.getPayload() + "================");});

解决方案

每个topic最好只对应一个事件,如果非要对应多个事件,那同一个服务中,不能使用两个不同事件但topic相同

场景二:服务启动时,开启异步线程,发送消息

当服务启动时开启异步线程发送消息,此时事件客户端启动完成初始化的阶段不能确定,有可能事件客户端还没开始初始化,或者初始化正在进行,此时异步线程发送消息可能导致不能预料的错误,具体错误与事件客户端进行进度有关

解决方案

监听事件客户端启动完成后发布的EventSender事件,在监听EventSender的回调方法中执行异步发送消息的逻辑。事件监听的相关知识请查看https://docs.spring.io/spring-framework/docs/current/reference/html/core.html#spring-core

场景三:多线程并发调用发送消息方法

多线程并发调用发送消息方法,并且都是往同一个事件发送消息,可能导致第一个线程进入resolveDestination方法的synchronized代码块,但还没有完成输出通道注册,之后的线程在上下文无法通过输出通道名获取bean,也会等待进入synchronized代码块的初始化输出通道逻辑。当第一个线程初始化输出通道逻辑结束,第二个线程进入synchronized代码块执行初始化输出通道逻辑,由于已经初始化完成,则在创建错误通道时会报上述异常,之后进入synchronized代码块的相同输出通道的线程都会报这个异常

ProducerProperties producerProperties = new ProducerProperties();
producerProperties.setPartitionKeyExpression(new SpelExpressionParser().parseExpression("payload.tenantId"));
producerProperties.setPartitionCount(2);
Thread thread = new Thread(new Runnable() {@Overridepublic void run() {for(int i=0; i< 10 ; i++) {eventSender.fireEvent(EventSenderConfig.newBuilder().tenantId(0L).eventCode("HALT_TARGET_1").category("HALT_TARGET_1").producerProperties(producerProperties).data(alertRoute).builder(), message -> {System.out.println("======message=====Headers " + message.getHeaders() + "================");System.out.println("======message=====Payload " + message.getPayload() + "================");});}}
});
thread.start();Thread thread2 = new Thread(new Runnable() {@Overridepublic void run() {for(int i=0; i< 10 ; i++) {eventSender.fireEvent(EventSenderConfig.newBuilder().tenantId(0L).eventCode("HALT_TARGET_1").category("HALT_TARGET_1").producerProperties(producerProperties).data(alertRoute).builder(), message -> {System.out.println("======message=====Headers " + message.getHeaders() + "================");System.out.println("======message=====Payload " + message.getPayload() + "================");});}}
});
thread2.start();

解决方案

覆盖BinderAwareChannelResolver,重写resolveDestination方法,在进入synchronized方法块后再尝试从上下文获取通道名对应的bean,如果获取到,则表明上个线程已经创建好输出通道,直接返回使用;如果还不能获取到输出通道的bean,则继续执行初始化任务

public MessageChannel resolveDestination(String channelName) {try {return super.resolveDestination(channelName);} catch (DestinationResolutionException var12) {synchronized(this) {// 如果再次获取输出通道成功则直接返回,失败则继续执行下面逻辑try{return super.resolveDestination(channelName)} catch (DestinationResolutionException var12) {}BindingServiceProperties bindingServiceProperties = this.bindingService.getBindingServiceProperties();String[] dynamicDestinations = bindingServiceProperties.getDynamicDestinations();boolean dynamicAllowed = ObjectUtils.isEmpty(dynamicDestinations) || ObjectUtils.containsElement(dynamicDestinations, channelName);MessageChannel var10000;try {var10000 = super.resolveDestination(channelName);} catch (DestinationResolutionException var10) {if (!dynamicAllowed) {throw var10;}MessageChannel channel = (MessageChannel)this.bindingTargetFactory.createOutput(channelName);this.beanFactory.registerSingleton(channelName, channel);this.instrumentChannelWithGlobalInterceptors(channel, channelName);channel = (MessageChannel)this.beanFactory.initializeBean(channel, channelName);if (this.newBindingCallback != null) {ProducerProperties producerProperties = bindingServiceProperties.getProducerProperties(channelName);Object extendedProducerProperties = this.bindingService.getExtendedProducerProperties(channel, channelName);this.newBindingCallback.configure(channelName, channel, producerProperties, extendedProducerProperties);bindingServiceProperties.updateProducerProperties(channelName, producerProperties);}Binding<MessageChannel> binding = this.bindingService.bindProducer(channel, channelName);this.dynamicDestinationsBindable.addOutputBinding(channelName, binding);return channel;}return var10000;}}
}

Dispatcher has no subscribers for channel排坑指南相关推荐

  1. 直流无刷电机调试排坑指南(铭朗电机驱动器,CAN调试,RS-232调试)

    直流无刷电机调试排坑指南(铭朗电机驱动器) 前言 调试设备 调试思路 调试过程 连接CAN分析仪 上位机安装.驱动安装 创芯科技CAN分析仪 对应的上位机与驱动 周立功CAN分析仪 对应的上位机与驱动 ...

  2. 华为平板安装python_教你用树莓派安装集成docker版openwrt、homeassistant等及一些排坑指南...

    教你用树莓派安装集成docker版openwrt.homeassistant等及一些排坑指南 2020-04-30 18:45:28 30点赞 290收藏 23评论 小编注:此篇文章来自即可瓜分10万 ...

  3. 基于docker-compose的Gitlab CI/CD实践排坑指南

    长话短说 经过长时间实操验证,终于完成基于Gitlab的CI/CD实践,本次实践的坑位很多, 实操过程尽量接近最佳实践(不做hack, 不做骚操作),记录下来加深理解. 看过博客园<docker ...

  4. 基于.NetCore结合docker-compose实践Gitlab-CI/CD 排坑指南

    引言 看过docker-compose真香的园友可能留意到当时是[把部署dll文件拷贝到生产机器],即时打包成镜像并启动容器,并没有完成CI/CD. 经过长时间实操验证,终于完成基于Gitlab的CI ...

  5. go 切片取最后一个元素_深挖 Go 之 forrange 排坑指南

    今年做个 Dig101 系列,挖一挖技术背后的故事. Dig101: dig more, simplified more and know more golang 常用的遍历方式,有两种:for 和 ...

  6. pyltp实体识别_哈工大 PYLTP 安装 排坑指南

    0 哈工大 PYLTP 简介 pyltp 是 LTP 的 Python 封装,提供了分词,词性标注,命名实体识别,依存句法分析,语义角色标注的功能. github网址:HIT-SCIR/pyltp 在 ...

  7. git原理详解与实操指南_基于dockercompose的Gitlab CI/CD实践amp;排坑指南

    长话短说 经过长时间实操验证,终于完成基于Gitlab的CI/CD实践,本次实践的坑位很多, 实操过程尽量接近最佳实践(不做hack, 不做骚操作),记录下来加深理解. 看过博客园<docker ...

  8. 融云国产化适配排坑指南

    超链接实验室,是融云策划推出的 IT 系列直播课,携手行业专家,一起聊聊 IT 国产化.协同办公通信.通信中台.企业数字化的那些事儿.关注[融云 RongCloud],了解协同办公平台更多干货. 融云 ...

  9. Julia 排坑指南

    Julia 是一个高效的计算语言,据说性能和C++有一拼. Google也开始支持TPU的Julia, 个人觉得他的可视化比较厉害,下面是自己安装过程的截图,由于Julia的服务器在国外,所以下载的过 ...

最新文章

  1. pytorch实现常用的一些即插即用模块(长期更新)
  2. 由汉诺塔引起的对递归的思考
  3. php 忽略加载动态某个目录,限定某个目录禁止解析php 、限制user_agent 、php的配制文件、PHP的动态扩展模块...
  4. Python中的三目运算符
  5. html-css-js的几款前端开发工具
  6. 织梦响应式酒店民宿住宿类网站织梦模板(自适应手机端)
  7. 图像分割法-snake
  8. 一种基于HBase韵海量图片存储技术
  9. html img 居中填满,html里的img标签怎么居中显示
  10. 35岁以后对自己职业人生的思考及一些感悟
  11. 01_CCC3.0数字钥匙_蓝牙OOB配对过程
  12. Application provided invalid, non monotonically increasing dts to muxer in stream
  13. 豆粕5连跌四月季节性偏弱,铁矿石认购翻倍,甲醇05-09季节性反套2022.3.30
  14. krpano相关笔记
  15. VMware vMotion简介
  16. SQL Server 安全篇——SQL Server加密(1)——加密概念
  17. 全网最硬核 JVM TLAB 分析 1. 内存分配思想引入
  18. Java SE 008 理解面向对象程序设计 (Inside Object Oriented Programming)
  19. 黑暗之光第2章:角色创建(魔法师和剑士)
  20. lower_bound和upper_bound的用法

热门文章

  1. 西工大noj(2~10)
  2. 如何将 SQL SERVER 彻底卸载干净
  3. ajax 实验报告,AJAX实验报告 (4500字).doc
  4. 项目总结 OTO项目
  5. Azure 开发者新闻快讯丨开发者6月大事记一览
  6. 专升本英语——应试题型突破——阅读理解——阅读理解做题技巧【学习笔记】
  7. 小车自动往返工作原理_自动往返小车
  8. 网易互动直播2.0 开发 十八 双屏逻辑
  9. NCE4 L3 Matterhorn man
  10. 批处理——批处理简介